QB64.org Forum
Active Forums => Programs => Topic started by: Zeppelin on December 02, 2018, 08:17:03 pm
-
Hey everyone,
I'm making a turn-based text fighting game, and previously when putting my 2 strings at
and
they would sit nicely one under the other, but now they overlap and I'm unsure if I've done something or something else is affecting it.
To play the mode with the error:
Single-player -> Practice
Thanks,
Zep
The files are attached below if you want to read through the whole thing ( there are a heap of bugs) :)
-
Here is a graphical illustration of the problem.
patk = 99.9999
SCREEN _NEWIMAGE(800, 600, 32) '<<<<<<<<<<< this matters if h, w are related w = 500: h = 200
h = h + 20
The way this is setup, h change will change the distance between the 2 lines. .25 * h/10 has to be just big enough to fit a new line.
Here is how B+ might fix it, but many other ways!
patk = 99.9999
SCREEN _NEWIMAGE(800, 600, 32) '<<<<<<<<<<< this matters if h, w are related w = 500: h = 200
h = h + 20
If just add the height of font to last line location, you have it made in the shade.
And say you want to add more lines:
patk = 99.9999
SCREEN _NEWIMAGE(800, 600, 32) '<<<<<<<<<<< this matters if h, w are related w = 500: h = 200
h = h + 20
Bline$
= "Here is B+" + STR$(i
) + " centered line added." _PRINTSTRING (w
/ 2 - LEN(Bline$
) * fw
/ 2, h
/ 10 * 3 + (i
+ 1) * fh
), Bline$
-
Ah, I see.
Thanks for your detailed explanation bplus
Zep