| |
Text boxes/Speech/Menu Screens in MMF2
Miaxis |
|

hagan bromas
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif)

Group: Members
Posts: 1799
Member No.: 2793
Joined: 12-October 06
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
Assuming you know how to draw stuff on the screen, menu screens shouldn't be too hard since they're just drawing different things at different positions. Text boxes will dragon and be a bit harder if you want the text to automatically align with the borders of the textbox or if you want a typewriter-like textbox.
The basics of a menu screen is having two variables (or alterable values), I'll name them "frame" and "position". frame indicates which part of the menu we are at (0 for main, 1 for items, 2 for equipment, go on), position indicates where the cursor is pointing at (if he's pointing at the "Items" option, the "Equipment" option, etc).
If frame equals 0, we're at the main screen, so the main screen stuff is drawn. If it equals 1, we draw the item screen stuff (of course you'll have to use an ini file or something for the inventory, but I'm just explaining the basics for now). If position equals 0, draw the cursor next to "Items", etc. Then just recieve input from the user, as in alter the position value if one of the arrow keys is pressed, alter the frame value if the user presses the back or the ok/decision button so he ends up on the correct screen.
Drawing static textboxes is basically drawing text onto the screen while drawing a textbox as a background. You'll have to mess around with positioning if you don't plan to write a script so the text automatically aligns with the textbox, though.
This post has been edited by Miaxis on Oct 10 2009, 02:25 PM
--------------------
|
|
|
Xgoff |
|

<):|
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Sprite Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/scg1.gif) ![Drawing Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/dcg1.gif) ![Drawing Comp Runner Up Badge (1) [*]](https://archive.mfgg.net/html/badges/dcr1.gif) ![MFGG Awards 2006 Winner [*]](https://archive.mfgg.net/html/badges/award06.gif)
![MFGG Awards 2007 Winner [*]](https://archive.mfgg.net/html/badges/award07.gif) ![Forum Event Badge [*]](https://archive.mfgg.net/html/badges/event.gif)

Group: Members
Posts: 52341
Member No.: 24
Joined: 13-October 03
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
for text boxes you could cheat and use text blitter
--------------------
 DISCLAIMER: by sending me (xgoff) a private message, you agree to the directives and their terms specified henceforth: DIRECTIVE 1 (APPLE): i may or may not reply promptly or at all; and there are no guarantees to the usefulness of the reply. i may not acknowledge whether i have even received your private message DIRECTIVE 2 (CHILE CON CARNE): as per my view, "private" applies only to the initial transaction, and the material of your message may or may not be made public at my discretion; as this will more than likely be a post in the CCC or IRC, you may not be able to view it DIRECTIVE 3 (FEATHER DUSTER): you must address me (xgoff) as "Sir Master Xgofficus his Highest and Most Awesome the Third"; failure to comply with this term may invoke one or both of the above directives, and i will leave a burning bag of **** on your doorstep DIRECTIVE 4 (BOOTSTRAP): if you have read this disclaimer, please private message me promptly, in compliance with the above terms, so i can ensure you are capable of following directions you idiot this concludes the test of the emergency disclaimer system, your scheduled programming will now continue. satisfaction guaranteed, and 100% cash back available under certain circumstances; restrictions may or may not apply within your place of residence NOTICE: these directives and their terms may change at any time, without notice; as a private message transaction to myself assumes an understanding and full compliance of the above, you should ensure you are fully aware of the above terms at any point before sending a private message; any message received is assumed to have been sent in compliance with the above| QUOTE | (5:25:58 PM) Mikau: xgoff (5:26:00 PM) Mikau: guess what (5:26:04 PM) Xgoff: chicken butt (5:26:09 PM) Mikau: **** you |
|
|
|
Glukom |
|

OFF TO JOIN THE NAVY
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Sprite Comp Runner Up Badge (3) [*]](https://archive.mfgg.net/html/badges/scr3.gif) ![Sprite Comp Top 5 Badge (5+) [*]](https://archive.mfgg.net/html/badges/sct5.gif) ![MFGG Awards 2008 Winner [*]](https://archive.mfgg.net/html/badges/award08.gif) ![Secret Santa Badge [*]](https://archive.mfgg.net/html/badges/present.gif)

Group: Members
Posts: 4071
Member No.: 2455
Joined: 6-August 06
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
| QUOTE (Miaxis @ Oct 10 2009, 03:23 PM) | Assuming you know how to draw stuff on the screen, menu screens shouldn't be too hard since they're just drawing different things at different positions. Text boxes will dragon and be a bit harder if you want the text to automatically align with the borders of the textbox or if you want a typewriter-like textbox.
The basics of a menu screen is having two variables (or alterable values), I'll name them "frame" and "position". frame indicates which part of the menu we are at (0 for main, 1 for items, 2 for equipment, go on), position indicates where the cursor is pointing at (if he's pointing at the "Items" option, the "Equipment" option, etc).
If frame equals 0, we're at the main screen, so the main screen stuff is drawn. If it equals 1, we draw the item screen stuff (of course you'll have to use an ini file or something for the inventory, but I'm just explaining the basics for now). If position equals 0, draw the cursor next to "Items", etc. Then just recieve input from the user, as in alter the position value if one of the arrow keys is pressed, alter the frame value if the user presses the back or the ok/decision button so he ends up on the correct screen.
Drawing static textboxes is basically drawing text onto the screen while drawing a textbox as a background. You'll have to mess around with positioning if you don't plan to write a script so the text automatically aligns with the textbox, though. |
I'm not really concerned with the technical part of it, like telling what frame of the menu screen or whatever you're on, I'm more concerned with the visual aspect, like the text box itself.
| QUOTE | | for text boxes you could cheat and use text blitter |
I could see this being useful for text itself, but I still have a problem with the boxes :[
--------------------
EVERYBODY WHO READS THIS AND DISLIKES THE DIRECTION OF NEW MFGG
i feel your pain :[
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
[ Script Execution time: 0.0517 ] [ 13 queries used ] [ GZIP Enabled ] [ Server Load: 1.35 ]
| |