adding a new menu...


(Miguel) #1

to add a new menu, i just add a new button in “main.menu” like this

BUTTON( 6, 152, WINDOW_WIDTH-12, 18, "Test", .3, 14, close main ; open credits_splashdamage )

he have to open a page that already exists but he doesn’t… why?
i changed the place of the button too…
do i need to change dll’s?


(Miguel) #2

i have it like this:

BUTTON( 6, 32, WINDOW_WIDTH-12, 18, "Join a game", .3, 14, close main ; /*close backgroundmusic ; open backgroundmusic_server ;*/ uiScript UpdateFilter ; uiScript ServerSortDown 4 ; open playonline )
BUTTON( 6, 56, WINDOW_WIDTH-12, 18, "Create Server", .3, 14, close main ; /*close backgroundmusic ; open backgroundmusic_server ;*/ uiScript loadArenas ; uiScript initHostGameFeatures ; open hostgame )
BUTTON( 6, 80, WINDOW_WIDTH-12, 18, "Replays", .3, 14, close main ; open viewreplay )
BUTTON( 6, 104, WINDOW_WIDTH-12, 18, "Options", .3, 14, close main ; open options )
BUTTON( 6, 128, WINDOW_WIDTH-12, 18, "Profile", .3, 14, close main ; open profile )
BUTTON( 6, 152, WINDOW_WIDTH-12, 18, "Credits", .3, 14, close main ; open credits_splashdamage )
BUTTON( 6, 176, WINDOW_WIDTH-12, 18, "test", .3, 14, close main ; open credits_splashdamage )
BUTTON( 6, 224, WINDOW_WIDTH-12, 18, "Exit Game", .3, 14, clearFocus ; open quit )

(nUllSkillZ) #3

Try to take a look here:
http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=6595

Ignore the sourcecode changes.


(Miguel) #4

done :clap:

but when i add the new menu, the “Quit Game” button is out of the buttons box and then that button doesn’t work… All of the other buttons works, even the new one but the exit one doesn’t… Why?


(Miguel) #5

no, no!! it’s working now, i found the way to make it work…

i just edited the “main.menu” at line 8

#define WINDOW_HEIGHT 300 //200 is the default”

thank you!