Menu tutorials?
Posted: Tue Feb 27, 2018 11:34 pm
Are the any tutorials I could look at that could help me understand ShowMenu(), how menu systems work, and how to set up my own menu system? Also bonus points for any HUD tutorials.
I'd like to make a menu system that can be pulled up when the player does an input, and I want to use my own byte values to cycle through individual options in the menu. I want to then be able to open another menu (or sub-menu?) based on what option I have 'selected'. In this sub-menu, I'd like to scroll through a list of potential int variables from 0-49 and be able to select one of these values, which should assign it to a value to be plugged into a fire() command (for instance, fire(11) ). From there, I'd like to be able to back out to the previous menu then exit out of that and go back into playing the game.
I have the input code to open the main menu here, I think:
And I've been looking at the menu call found in PlayerPawn:
And I've noticed some interesting code already, namely 'Player.Console.GotoState('Menuing');'.
I'd like to make a menu system that can be pulled up when the player does an input, and I want to use my own byte values to cycle through individual options in the menu. I want to then be able to open another menu (or sub-menu?) based on what option I have 'selected'. In this sub-menu, I'd like to scroll through a list of potential int variables from 0-49 and be able to select one of these values, which should assign it to a value to be plugged into a fire() command (for instance, fire(11) ). From there, I'd like to be able to back out to the previous menu then exit out of that and go back into playing the game.
I have the input code to open the main menu here, I think:
Code: Select all
exec function CommandThree( optional byte F )
{
if ( Health > 0 )
{
if ( bShowMenu || Len(Level.Pauser)>0 )
return;
else
{
bUsedCommandThree = true;
//ShowMenu(); ???
return;
}
}
}
Code: Select all
exec function ShowMenu()
{
WalkBob = vect(0,0,0);
bShowMenu = true; // menu is responsible for turning this off
Player.Console.GotoState('Menuing');
if ( Level.Netmode == NM_Standalone )
SetPause(true);
}