Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Any way to move the Print command to a different x, y area? If not use CreateText which can update when a variable changes?

Author
Message
Thugnificent
8
Years of Service
User Offline
Joined: 16th Aug 2016
Location:
Posted: 17th Aug 2016 20:57
i want to be able to display a text which updates when i press a button. It'll add +1 to the total count.

This works fine with the print command however, i want to be able to move the text around and place it inside a frame. I know i can use the createtext command to make a text box but it never updates. I tried putting the createtext box inside the main Do Loop but it just messes up the look of the next number pressed as i think it keeps the old createtext object on the screen and adds a new one on top. This can also cause a performance hit so i don't want to do that.

How can i achieve what i am trying to do?
Thugnificent
8
Years of Service
User Offline
Joined: 16th Aug 2016
Location:
Posted: 17th Aug 2016 21:10
ok figured it out.

I left the createtext command outside the main do loop and put



inside the main do loop.

Thanks guys
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 18th Aug 2016 17:43
thanks for posting the solution, i didn't know this and normally just delete the text and recreate it each loop (or as needed) to update it, this would be much simpler though
life\'s one big game
spec= 2.6ghz, 1gb ram, 512mb gpu, directx 9.0c, dbpro and classic
Thugnificent
8
Years of Service
User Offline
Joined: 16th Aug 2016
Location:
Posted: 18th Aug 2016 18:32
Np, glad i could help someone.

If you have too many of these set text (in my case it was), i simply put all of them in a function and called the function in the do loop. Works wonders.

Login to post a reply

Server time is: 2024-09-29 17:25:17
Your offset time is: 2024-09-29 17:25:17