Computer Science Canada Help With Making Custom GUI |
Author: | Danjen [ Sun May 25, 2008 9:12 pm ] | ||
Post subject: | Help With Making Custom GUI | ||
Okay, so I'm trying to make an RPG in turing and I want pretty much everything made custom, to create the illusion of professional quality. ![]() Specifically, what I'm going for is like pop up windows that can contain text (or not). If you've ever played a Final Fantasy game, you should know exactly what I'm aiming for. I am having two specific issues with this, the first one being that I am not sure of the best way to close the window when it is finished. Yes, I can have it close have a certain period or when a user inputs the 'okay' key, but I'm not sure HOW to do this, especially since this will be a class. Secondly, I have tried without much success to make the text scroll down to the next line as it types, an effect seen in applications like notepad or wordpad. Here is what I have so far:
|
Author: | SNIPERDUDE [ Mon May 26, 2008 6:44 am ] |
Post subject: | RE:Help With Making Custom GUI |
have a global boolean variable that determines whether it is visible or not - every time the user dismisses the thing it will be false, every time the text changes reset the variable. That's pretty much what I did in mine. For the other problem - try a text wrap. so determine the length of the string (Font.Width) and make sure it fits. Got through it word by word in a loop checking this, whatever doesn't fit becomes a new line. Just an idea - when I did something like this - I used a custom made Tokenizer (used in java I believe) to help with the breaking down of the string. |
Author: | Danjen [ Mon May 26, 2008 7:24 pm ] |
Post subject: | RE:Help With Making Custom GUI |
The only problem I have with the boolean method is that it would be a global variable and not inclusive to the class itself. Ultimately, I'm trying to make a general case so that I can use this in any number of engines. |
Author: | SNIPERDUDE [ Tue May 27, 2008 6:29 am ] |
Post subject: | RE:Help With Making Custom GUI |
hmmm, the boolean var is an array, and you work with an Index? ex: Gui (Message).DrawTextBox (1, "Filler filler filler filler filler filler", 294, 252, 20, 2) * the first number in the parameters is an index number... |