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.

Code Snippets / moveable consloe window example (fast code)

Author
Message
posting unit #42
19
Years of Service
User Offline
Joined: 10th Dec 2004
Location:
Posted: 17th Jan 2005 23:40
This is a simple console window that will display static or dynamic text.

It can be draged with the mouse or resized.
click the top left to drag or bottom right to resize.

Open it by pressing the "`" key(next to the one key), you can also scroll the text with the up/down arrow keys.

It wont look much on screen but it wont eat cpu time either.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 18th Jan 2005 20:42
I've made a similar text box like that before. Not a movable console though. The only problem I noticed is when you scroll to the last line, it'll flicker if you try to go past it. My guess is that if you have 80 current lines, it's showing the cursor at 81(no lines) before it wraps the cursor back to 80. I didn't give the code a real look, so this is just a guess.

"eureka" - Archimedes
posting unit #42
19
Years of Service
User Offline
Joined: 10th Dec 2004
Location:
Posted: 19th Jan 2005 04:23
The bug is in draw_text()

if logy>maxlog
logy=maxlog-1

endif

to:

if logy>=maxlog
logy=maxlog-1

endif

Login to post a reply

Server time is: 2024-11-23 16:48:53
Your offset time is: 2024-11-23 16:48:53