Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Get statement with fonts
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Untitled




PostPosted: Thu Mar 17, 2016 8:27 pm   Post subject: Get statement with fonts

What is it you are trying to achieve?
I am trying to put a font on a get statement. In my math game I have a some fonts for the two numbers you are adding together, and it looks strange when you type the answer is a different small fonts. The background picture kind of blocks it out as well.

What is the problem you are having?
I cannot figure out how to do it, if there is any way.

Describe what you have tried to solve this problem
I have tried googling around and using the tutorials but I can't find anything about my issue.


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Turing:

var answer : int
%fonts

proc Addition
       %Stuff to get random numbers
        get answer
end Addition


Please specify what version of Turing you are using
4.1.1
Sponsor
Sponsor
Sponsor
sponsor
Dreadnought




PostPosted: Fri Mar 18, 2016 10:38 am   Post subject: Re: Get statement with fonts

You cannot do this with get. You would have to write your own version of get using inputmodule and fontmodule.
Untitled




PostPosted: Fri Mar 18, 2016 12:14 pm   Post subject: RE:Get statement with fonts

That doesn't sound easy.. how would I go about doing that
Dreadnought




PostPosted: Fri Mar 18, 2016 4:15 pm   Post subject: Re: Get statement with fonts

Note that in the preferences for Turing you can set the font and font size for the run window, but you can only choose monospace fonts (if that works for you, then it's probably the easiest solution).

inputmodule provides functions to wait for a key press and to read which key was pressed (input.getchar gives you the character for the key that was pressed). From there you just keep track of what was entered by the user, display it to the screen and update things whenever the user presses a key.
Untitled




PostPosted: Fri Mar 18, 2016 4:26 pm   Post subject: RE:Get statement with fonts

Thanks, very helpful;
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: