|
Canvases
May 18, 2019 11:09:20 GMT -6
via mobile
Post by tbird on May 18, 2019 11:09:20 GMT -6
I believe I understand what you mean, so you need a 'y' value that has a modifier multiplied by it to adjust where it draws dependant on how many messages are incoming.
messNextY = 25
For m = 0 To numIncMess messY = messY + (messNextY * m) DrawText(message$[m], messX, messY) Next
Kinda like that...? I just wrote it on my phone quick so no idea if it works lol.
|
|
|
Post by tbird on May 18, 2019 13:52:21 GMT -6
Oh forgot to mention, use ReadInput_Stop() to stop filling the buffer in the background, I personally don't stop and start the buffer I just reset the buffer using ReadInput_SetText(""), but I would think the proper way would be to use the 'Start' and 'Stop' where required...maybe it makes hardly any difference....only n00b would know lol
|
|
|
Post by johnno56 on May 18, 2019 16:33:46 GMT -6
This is a capture of the sdlbasic version. In this instance there is only one enemy. At times I have had up to three. Each time an enemy is fired at, it will either reply 'destroyed' or 'damaged' messages. When there are more than one, the the messages - inputs - responses, will be added beneath the previous enemy messages... I hope this helps. J Sdlbasic can print to both screen and console. "Print("")" - Console and "PrintS("")" - Screen. I am not putting down RC, by any means, just pointing out my problem trying to convert.
|
|
|
Canvases
May 18, 2019 17:33:54 GMT -6
via mobile
Post by tbird on May 18, 2019 17:33:54 GMT -6
You could do the same with printS and locate commands check the manual they print to the screen. They are under the Screen Console section. There is even something to return input in there as well. Sorry would have mentioned this first but I have never used it before.
|
|
|
Post by johnno56 on May 18, 2019 21:42:50 GMT -6
Cool... The 'prints()' and 'inputs()' both used the canvas. The only problem I had was it used a 'default' font and size. I tried the LoadFont() and the font() commands but they had no effect. I think that these commands, as well as RenderText(), are primarily for "Drawing" text to the canvas.
This not a 'deal breaker' as prints and inputs and locate should work fine. So, with that potential difficulty eased, I can get on with the conversion. I can only work on it today, because the next few days (Mon to Wed), my wife and I are "going bush", and will be "off the air" enjoying a brief break from all that is work... Will report on project update maybe on Thursday (Oz time)
|
|
|
Canvases
May 18, 2019 21:48:17 GMT -6
via mobile
Post by tbird on May 18, 2019 21:48:17 GMT -6
Have fun, going bush is my daily routine 😆.
|
|
|
Post by johnno56 on May 18, 2019 22:08:28 GMT -6
Could not resist... Quick update. prints() and locate() seems to apply only to the "Window" and totally ignores the Canvas. Oh well. Back to the drawing board...
|
|
|
Post by n00b on May 19, 2019 0:32:13 GMT -6
PrintS(), InputS(), and Cls() all effect the window directly but don't apply to individual Canvases. That is what you would want to use DrawText() and the Text Edit commands for?
|
|
|
Post by johnno56 on May 19, 2019 0:57:13 GMT -6
"Drawing" text in the canvases is preferable because of the choice of fonts and styles and the ability to direct said text to the canvas of choice. Primarily, most of the messages and input requests will involve the canvas that spans the bottom of the display. As most messages can vary in its location, "Drawing" to a fixed position, could be problematic at best. Not impossible but could be difficult. The other alternative is, to use Prints() and InputS using "raw" text, then Locate() to place it on the Window. I haven't got to 'that' part of the conversion yet and maybe creating my own problems. I just wanted to avoid any difficulties. When I get to that part, I may have a better idea, as to how to fix it... Difficult to explain when I can't actually visualise the problem yet... I hope I am making sense... Because it sounds pretty weird to me... lol
|
|