I have download fxSDK and Gint before some days and it's all fine, but i have some problems with coding , when i print some lines i can't do scrolling up and down like a console


Code:

// dtext(x,y,text)
dtext(1,1,"Line 1");
dtext(1,8,"Line 2");
dtext(1,8*2,"Line 3");
dtext(1,8*3,"Line 4");
dtext(1,8*4,"Line 5");
dtext(1,8*5,"Line 6");
dtext(1,8*6,"Line 7");
dtext(1,8*7,"Line 8");
dtext(1,8*8,"Line 9");
dtext(1,8*9,"Line 10");
dtext(1,8*10,"Line 11");


The "Line 10" and "Line 11" goes under the screen , how i can add something let me scroll up [ ↑ ] and down [ ↓ ] Neutral Neutral
There is no console in gint. I have somewhere in my todo list a project of creating one, but not started yet Sad

So if you want to have scrolling, you have to implement this feature.
Let's explain how gint is working : imagine it is a simple graphical text output, not a text console. dtext() / dprint() functions are just rendering your text in the graphical output at given coordinates.

So if you want to implement scrolling, you need to store your lines of text in variables and capture key inputs from user to know if you scroll up and down.
Based on these inputs, you need to recalculate :
1/ if lines are visible and
2/ if so, what are their coordinates on the screen.

Not hat hard, but need to spend some time on this.

Before you ask, please be aware that currently there is now scanf() like function in gint, so don't look for them. They are just available in a PR, but not yet implemented in gint.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement