Jump to content

Errors in my .menu file?


Recommended Posts

So this menu I have keeps crashing the game. I can't figure out where I went wrong in the menu. Everything seems to be in order, and I've also pinpointed this specific .menu file to be the problem. Can you guys help me find if I did something wrong?

 

In the past it's come down to missing/misplaced brackets or spaces where there shouldn't be. I can't seem to figure this one out though.

 

//----------------------------------------------------------------------------------------------
//
// MULTIPLAYER - MAIN MENU
//
// Opening menu. Called when game is first started.
//
//----------------------------------------------------------------------------------------------
{
menuDef 
{
name "help_menu"
fullScreen 1
rect 0 0 640 480 // Size and position of the menu
 
focusColor 1 1 1 1 // Focus color for text and items
descX 374
descY 452
descScale 0.7
descColor 0.1 0.7 1 0.9
descAlignment ITEM_ALIGN_CENTER
visible 1
 
onOpen 
{
hide classes ;
show group1
}
 
onESC 
play "sound/interface/back.mp3" 
close all ;
open main 
}
 
onClose
}
 
 
//----------------------------------------------------------------------------------------------
// MENU BACKGROUND
//----------------------------------------------------------------------------------------------
itemDef 
{
name background
group none
style WINDOW_STYLE_SHADER
rect 0 0 640 480
background "gfx/menus/mb_background"
forecolor 1 1 1 1
visible 1
decoration
}
 
itemDef 
{
name menu_frame
group none
style WINDOW_STYLE_SHADER
rect 0 0 640 480
background "gfx/menus/menu_bar_setcon"
forecolor 1 1 1 1
visible 1
decoration
}
 
itemDef 
{
name mblogo
group none
style WINDOW_STYLE_SHADER
rect 340 385 310 80
background "gfx/menus/mb_logo"
forecolor 1 1 1 1
visible 1
decoration
}
 
itemDef 
{
name classbutton
group group1
style WINDOW_STYLE_EMPTY
type ITEM_TYPE_BUTTON
rect 215 203 174 24 
text "Classes" descText "Describes the traits and skills of various player-selectable classes."
font 3
textscale 1
textaligny 0
textalign ITEM_ALIGN_CENTER
textstyle 0
textalignx 82
forecolor 1 1 1 1
visible 0
 
mouseEnter 
show button_glow 
setitemrect button_glow 210 203 174 25
}
mouseExit 
hide button_glow 
}  
action 
{
play "sound/interface/go.mp3" ; 
hide group1 ; 
show classes 
}
}
 
itemDef 
{
name weaponsbutton
group group1
style WINDOW_STYLE_EMPTY
type ITEM_TYPE_BUTTON
rect 215 223 174 24 
text "Weapons" descText "Describes the weapons and their abilities used ingame."
font 3
textscale 1
textaligny 0
textalign ITEM_ALIGN_CENTER
textstyle 0
textalignx 82
forecolor 1 1 1 1
visible 0
 
mouseEnter 
show button_glow 
setitemrect button_glow 210 223 174 25
}
mouseExit 
hide button_glow 
}  
action 
{
play "sound/interface/go.mp3" ; 
hide group1 ; 
show weapons 
}
}
 
itemDef 
{
name techniquesbutton
group group1
style WINDOW_STYLE_EMPTY
type ITEM_TYPE_BUTTON
rect 215 243 174 24 
text "Strategy/Tips" descText "Describes general gameplay strategies used by players."
font 3
textscale 1
textaligny 0
textalign ITEM_ALIGN_CENTER
textstyle 0
textalignx 82
forecolor 0.1 0.7 1 0.9
visible 0
 
mouseEnter 
show button_glow 
setitemrect button_glow 210 243 174 25
}
mouseExit 
hide button_glow 
}  
action 
{
play "sound/interface/go.mp3" ; 
hide group1 ; 
show Strategy 
}
}
 
itemDef 
{
name classcategory
group classes
style WINDOW_STYLE_EMPTY
type ITEM_TYPE_MULTI
rect 205 203 174 24 
text "Class:" descText "Describes the traits and skills of various player-selectable classes."
font 3
textscale 1
textaligny 0
textalign ITEM_ALIGN_CENTER
textstyle 0
textalignx 82
forecolor 0.1 0.7 1 0.9
visible 0
 
cvar ui_classname
cvarStrList
{
"Soldier" "1; ui_classdesc @HELP_SOLDIER"
"Elitetrooper" "2; ui_classdesc @HELP_ET"
"Hero" "3; ui_classdesc @HELP_HERO"
"Bounty Hunter" "4; ui_classdesc @HELP_BH"
"Jedi/Sith" "5; ui_classdesc @HELP_JEDI"
"Clonetrooper" "6; ui_classdesc @HELP_CLONE"
"ARC Trooper" "7; ui_classdesc @HELP_ARC"
"Wookiee" "8; ui_classdesc @HELP_WOOKIEE"
"Droideka" "9; ui_classdesc @HELP_DEKA"
"Super Battle Droid" "10; ui_classdesc @HELP_SBD"
"Mandalorian" "11; ui_classdesc @HELP_MANDO"
}
 
mouseEnter 
show button_glow 
setitemrect button_glow 210 203 174 25
}
mouseExit 
hide button_glow 
}  
action 
{
play "sound/interface/go.mp3" ; 
exec "vstr ui_classname" 
}
}
 
itemDef 
{
name classdescbox
group classes
style WINDOW_STYLE_EMPTY
type ITEM_TYPE_TEXTSCROLL
rect 205 223 174 24 
font 3
textscale 1
textaligny 0
textalign ITEM_ALIGN_CENTER
textstyle 0
textalignx 82
forecolor 0.1 0.7 1 0.9
visible 0
cvar ui_classdesc
autowrapped
lineHeight 14
}
 
 
//----------------------------------------------------------------------------------------------
// TOP MENU BUTTONS
//----------------------------------------------------------------------------------------------
itemDef 
{
name button_glow
group none
style WINDOW_STYLE_SHADER
rect 0 0 0 0
background "gfx/menus/mb_buttonback"
forecolor 0.1 0.7 1 0.7
visible 0
decoration
}
 
itemDef 
{
name playbutton
group none
style WINDOW_STYLE_EMPTY
type ITEM_TYPE_BUTTON
rect 15 253 174 24 
text "PLAY"
descText "Start playing"
font 3
textscale 1
textaligny 0
textalign ITEM_ALIGN_CENTER
textstyle 0
textalignx 82
forecolor 0.1 0.7 1 0.9
visible 1
 
mouseEnter 
show button_glow 
setitemrect button_glow 10 253 174 25
}
mouseExit 
hide button_glow 
}  
action 
{
play "sound/interface/go.mp3" ; 
close all ; 
open multiplayermenu 
}
}
 
// Big button "PLAYER PROFILE"
itemDef 
{
name profilebutton
group none
text @MENUS_PROFILE
descText "Change player settings"
style WINDOW_STYLE_EMPTY
type ITEM_TYPE_BUTTON
rect 15 292 184 24 
textaligny 0
font 3
textscale 1
textalign ITEM_ALIGN_CENTER
textstyle 0
textalignx 82
forecolor 0.1 0.7 1 0.9
visible 1
 
mouseEnter 
show button_glow 
setitemrect button_glow 10 292 184 25
}
mouseExit 
hide button_glow 
}  
action 
play "sound/interface/go.mp3" ; 
close all ; 
open playerMenu
}
}
 
// Big button "CONTROLS"
itemDef 
{
name controlsbutton
group none
text @MENUS_CONTROLS2
descText "Configure game controls"
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY
rect 15 330 170 25 
font 3
textscale 1
textaligny 0
textalign ITEM_ALIGN_CENTER
textstyle 0
textalignx 78
backcolor 0 0 0 0
forecolor 0.1 0.7 1 0.9
visible 1
 
mouseEnter 
show button_glow 
setitemrect button_glow 10 330 171 25
}
mouseExit 
hide button_glow 
}  
action 
{
play "sound/interface/go.mp3" ; 
close all ; 
open controlsMenu ;
}
}
 
// Big button "SETUP"
itemDef 
{
name setupbutton
group none
text @MENUS_SETUP
descText "Configure game settings"
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY
rect 15 369 151 24 
font 3
textscale 1
textaligny 0
textalign ITEM_ALIGN_CENTER
textstyle 0
textalignx 73
backcolor 0 0 0 0
forecolor 0.1 0.7 1 0.9
visible 1
 
mouseEnter 
show button_glow 
setitemrect button_glow 10 369 151 25
}
mouseExit 
hide button_glow 
}  
action 
{
play "sound/interface/go.mp3" ; 
close all ; 
open setup_menu
}
}
 
itemDef 
{
name helpbutton
group none
text "HELP/TUTORIAL"
descText "Learn about classes and game mechanics."
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY
rect 15 380 141 20 
font 3
textscale 1
textaligny 0
textalign ITEM_ALIGN_CENTER
textstyle 0
textalignx 73
backcolor 0 0 0 0
forecolor 0.1 0.7 1 0.9
visible 1
 
mouseEnter 
show button_glow 
setitemrect button_glow 10 380 141 21
}
mouseExit 
hide button_glow 
}  
action 
{
play "sound/interface/go.mp3" ; 
close all ; 
open help_menu
}
}
 
//----------------------------------------------------------------------------------------------
// OTHER MAIN MENU BUTTONS
//----------------------------------------------------------------------------------------------
 
//MB Credits
itemDef 
{
name creditsarea
group othermain
text ""
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY
rect 340 385 310 80
font 1
backcolor 0 0 0 0
forecolor 1 1 1 1
visible 1
 
mouseEnter 
play "sound/interface/empty.mp3" ; 
}
mouseExit 
play "sound/interface/empty.mp3" ; 
}
action 
play "sound/interface/go.mp3" ;
close all ; 
open MBcreditsMenu 
}
}
 
itemDef 
{
name exitgamebutton
group none
text @MENUS_EXIT
descText "Leave the game"
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY
rect 15 408 136 24 
font 3
textscale 1
textalign ITEM_ALIGN_CENTER
textstyle 0
textalignx 70
textaligny 0
forecolor 0.1 0.7 1 0.9
visible 1
 
mouseEnter 
show button_glow 
setitemrect button_glow 10 408 137 25
}
mouseExit 
hide button_glow 
}  
action 
play "sound/player/ysalimari.mp3"; 
close all ; 
open quitMenu 
}
}
 
 
}
}

 
 
 
 
 
 
 
 
 
 
Link to comment

Hmmmm...it looks ok to me. IDK, with all the tabs gone, its hard for me to decipher whats going on...

 

BTW - I think I know what you are building :P

 

And what am I building therfiles? If you thought something related to MB2 you'd be correct. 

 

Heh, I still can't figure out what's wrong....

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...