Computer Science Canada get font? |
Author: | LegendsEnd [ Mon Apr 17, 2006 2:11 pm ] |
Post subject: | get font? |
When using a get command, the text you enter is always the same font. I know I can do it the hard way and use getch + font.draw but is there a way to just plain change the font of get? |
Author: | TokenHerbz [ Mon Apr 17, 2006 3:17 pm ] | ||
Post subject: | |||
Well i don't know if you can with the "get" command, so i have another suggestion, make your own function to do this for you... Here ill help you with the basics, though i leave you to touch it up, and make it better ![]()
Hope this helps you out a bit... |
Author: | Delos [ Mon Apr 17, 2006 4:24 pm ] |
Post subject: | Re: get font? |
LegendsEnd wrote: When using a get command, the text you enter is always the same font. I know I can do it the hard way and use getch + font.draw but is there a way to just plain change the font of get?
No. I'm afraid you'll have to go the 'hard' way. The idea behind 'get' is that it is used in an all-text environment, hence there would not be the possibility of changing fonts. Once you move up to a graphical environment, that all changes and you can start implementing fancy curly writing and what not. Token's code isn't too bad. Take note of his use of parameters, that sort of thing is vital to any code that is even half decent. It will take quite a bit of touching up, but that code is workable. (My personaly preference would be for it to return a single character, then perform the loop outside of the function, but hey - different styles mayhaps). By the way, I'm going to start calling you Toe for completely logical reasons. Tell me what they are and I'll reward you! |
Author: | Bored [ Mon Apr 17, 2006 5:06 pm ] |
Post subject: | |
Well if you want the text to stay the same throughout the program you can go to turing preferences and click its run time or pun window or something allong that sort. You then select the text you want from the text and text size menus. But if you want to change the font during the program like one for in game and one for menu, or something along those ways your going to have to do it the hard way because there is no built in function to change the font mid-program. |
Author: | TokenHerbz [ Mon Apr 17, 2006 5:08 pm ] |
Post subject: | |
i didn't get that bored, and i read it a few times... |
Author: | Cervantes [ Mon Apr 17, 2006 5:26 pm ] |
Post subject: | |
He's saying you can change the default font used for put and get by going like this: File -> Preferences -> Run Window, then selecting the font. However, this only changes the font used for put and get on your computer. If you send your program to someone else to run it, they would also have to change their preferences to see the text the way you intended. |
Author: | TokenHerbz [ Mon Apr 17, 2006 9:53 pm ] | ||
Post subject: | |||
i dont have edit feature ![]() Anyways this is your fault i gotta repost my UPDATED function, we need an edit... Here i made it so it back spaces for you.. there might be a better way but this works
You can improve it if you wish ![]() |
Author: | do_pete [ Tue Apr 18, 2006 11:52 am ] | ||||
Post subject: | |||||
Here's a better way of doing it:
And here's how you would use it:
|
Author: | TokenHerbz [ Tue Apr 18, 2006 2:36 pm ] |
Post subject: | |
oooooo thats cool ![]() |