ItsMods
[Release] Easy Menu - Printable Version

+- ItsMods (https://www.itsmods.com)
+-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html)
+--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html)
+--- Thread: [Release] Easy Menu (/Thread-Release-Easy-Menu.html)

Pages: 1 2 3


Easy Menu - iAegle - 07-21-2011

A lot of people wanted to know how to make an easy menu.. well this one is quite easy. I'm sure people can find out how to add buttons and such

Just look true it and change the CAPS things:
MENU NAME HERE
CONFIG NAME HERE
TITLE NAME HERE
HIGHEST IMAGE NAME HERE
LOWEST IMAGE NAME HERE
MIDDLE IMAGE NAME HERE


but post questions if you don't understand!! this thread is kinda made for questions XD

Code:
#include "ui/menudef.h" #include "ui_mp/common_macro.inc" #include "ui_mp/menustyle.inc" #include "ui_mp/choices_setup_teams.menu" { menuDef { name "MENU NAME HERE" rect 0 0 640 480 focuscolor COLOR_FOCUSED style WINDOW_STYLE_EMPTY blurWorld 7.0 onOpen { execNow exec "CONFIG NAME HERE"; } onEsc { play "mouse_click"; close self; open "team_marinesopfor"; } CHOICE_MENU_TITLE( TITLE NAME HERE ) FRAME_CHOICE_BUTTON_FOCUS_VIS_EX( 1, "About Old School", open mod_information;, ;, ;, 1, ;) FRAME_CHOICE_BUTTON_FOCUS_VIS_EX( 2, "Server Information", open mod_serverinfo;, ;, ;, 1, ;) FRAME_CHOICE_BUTTON_FOCUS_VIS_EX( 4, "Play!", close self; open "team_marinesopfor";, ;, ;, 1, ;) // gradient_top itemDef { style WINDOW_STYLE_SHADER rect 0 0 854 75 HORIZONTAL_ALIGN_FULLSCREEN 0 background "gradient_top" visible 1 decoration } // gradient_bottom itemDef { style WINDOW_STYLE_SHADER rect 0 405 854 75 HORIZONTAL_ALIGN_FULLSCREEN 0 background "gradient_bottom" visible 1 decoration } itemDef { style WINDOW_STYLE_SHADER rect 60 -185 220 370 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER background "white" forecolor 0 0 0 0.8 border 1 bordersize 1.5 bordercolor 0.5 0.5 0.5 0.8 visible 1 decoration } itemDef { rect 70 70 200 100 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER forecolor 1 1 1 1 style WINDOW_STYLE_SHADER background "LOWEST IMAGE NAME HERE" visible 1 decoration } itemDef { rect 70 -50 200 100 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER forecolor 1 1 1 1 style WINDOW_STYLE_SHADER background "MIDDLE IMAGE NAME HERE" visible 1 decoration } itemDef { rect 70 -170 200 100 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER forecolor 1 1 1 1 style WINDOW_STYLE_SHADER background "HIGHEST IMAGE NAME HERE" visible 1 decoration } #include "ui/safearea.menu" } #include "ui_mp/popupstyle.inc" #include "ui/choices_setup_popmenu.menu" #undef POPUP_BUTTON_COUNT #define POPUP_BUTTON_COUNT 1 menuDef { SYSTEM_POPUP_SETUP_VIS( mod_information, ;, ;, 1 ) SYSTEM_POPUP_TITLE_VIS( "The point of this mod is to let people play with other guns then they normally do. Pick up weapons and perks from 'pickup points' to arm yourself.\n\nMod made by iAegle.", 1 ) FRAME_CHOICE_BUTTON_VIS_EX( 1, "@MENU_OK", close self;, 1, ;) } menuDef { SYSTEM_POPUP_SETUP_VIS( mod_serverinfo, ;, ;, 1 ) SYSTEM_POPUP_TITLE_VIS( ( dvarString( os_servernote ) ), 1 ) FRAME_CHOICE_BUTTON_VIS_EX( 1, "@MENU_OK", close self;, 1, ;) } #undef POPUP_BUTTON_COUNT #define POPUP_BUTTON_COUNT 3 menuDef { SYSTEM_POPUP_SETUP_VIS( mod_adminmenu, ;, ;, 1 ) SYSTEM_POPUP_TITLE_VIS( ( "Admin Menu\nYou can change settings in here." ), 1 ) CHOICE_DVARFLOATLIST( 1, "@OS_SETTING_WEAPON_RESPAWN", "os_weaponrespawntime", { "5" 5 "10" 10 "15" 15 "20" 20 "25" 25 "30" 30 }, ; ) CHOICE_DVARFLOATLIST( 2, "@OS_SETTING_PERK_RESPAWN", "os_perkrespawntime", { "5" 5 "10" 10 "15" 15 "20" 20 "25" 25 "30" 30 }, ; ) FRAME_CHOICE_BUTTON_VIS_EX( 3, "@MENU_OK", close self;, 1, ;) } }

ENDRESULT
[Image: 9A634C025D3A55767750FC0ACF9202DFD2A398BC]


RE: Easy Menu - Scripts18 - 07-21-2011

(07-21-2011, 23:11)iAegle Wrote: A lot of people wanted to know how to make an easy menu.. well this one is quite easy. I'm sure people can find out how to add buttons and such

Just look true it and change the CAPS things:
MENU NAME HERE
CONFIG NAME HERE
TITLE NAME HERE
HIGHEST IMAGE NAME HERE
LOWEST IMAGE NAME HERE
MIDDLE IMAGE NAME HERE


but post questions if you don't understand!! this thread is kinda made for questions XD

Code:
#include "ui/menudef.h" #include "ui_mp/common_macro.inc" #include "ui_mp/menustyle.inc" #include "ui_mp/choices_setup_teams.menu" { menuDef { name "MENU NAME HERE" rect 0 0 640 480 focuscolor COLOR_FOCUSED style WINDOW_STYLE_EMPTY blurWorld 7.0 onOpen { execNow exec "CONFIG NAME HERE"; } onEsc { play "mouse_click"; close self; open "team_marinesopfor"; } CHOICE_MENU_TITLE( TITLE NAME HERE ) FRAME_CHOICE_BUTTON_FOCUS_VIS_EX( 1, "About Old School", open mod_information;, ;, ;, 1, ;) FRAME_CHOICE_BUTTON_FOCUS_VIS_EX( 2, "Server Information", open mod_serverinfo;, ;, ;, 1, ;) FRAME_CHOICE_BUTTON_FOCUS_VIS_EX( 4, "Play!", close self; open "team_marinesopfor";, ;, ;, 1, ;) // gradient_top itemDef { style WINDOW_STYLE_SHADER rect 0 0 854 75 HORIZONTAL_ALIGN_FULLSCREEN 0 background "gradient_top" visible 1 decoration } // gradient_bottom itemDef { style WINDOW_STYLE_SHADER rect 0 405 854 75 HORIZONTAL_ALIGN_FULLSCREEN 0 background "gradient_bottom" visible 1 decoration } itemDef { style WINDOW_STYLE_SHADER rect 60 -185 220 370 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER background "white" forecolor 0 0 0 0.8 border 1 bordersize 1.5 bordercolor 0.5 0.5 0.5 0.8 visible 1 decoration } itemDef { rect 70 70 200 100 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER forecolor 1 1 1 1 style WINDOW_STYLE_SHADER background "LOWEST IMAGE NAME HERE" visible 1 decoration } itemDef { rect 70 -50 200 100 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER forecolor 1 1 1 1 style WINDOW_STYLE_SHADER background "MIDDLE IMAGE NAME HERE" visible 1 decoration } itemDef { rect 70 -170 200 100 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER forecolor 1 1 1 1 style WINDOW_STYLE_SHADER background "HIGHEST IMAGE NAME HERE" visible 1 decoration } #include "ui/safearea.menu" } #include "ui_mp/popupstyle.inc" #include "ui/choices_setup_popmenu.menu" #undef POPUP_BUTTON_COUNT #define POPUP_BUTTON_COUNT 1 menuDef { SYSTEM_POPUP_SETUP_VIS( mod_information, ;, ;, 1 ) SYSTEM_POPUP_TITLE_VIS( "The point of this mod is to let people play with other guns then they normally do. Pick up weapons and perks from 'pickup points' to arm yourself.\n\nMod made by iAegle.", 1 ) FRAME_CHOICE_BUTTON_VIS_EX( 1, "@MENU_OK", close self;, 1, ;) } menuDef { SYSTEM_POPUP_SETUP_VIS( mod_serverinfo, ;, ;, 1 ) SYSTEM_POPUP_TITLE_VIS( ( dvarString( os_servernote ) ), 1 ) FRAME_CHOICE_BUTTON_VIS_EX( 1, "@MENU_OK", close self;, 1, ;) } #undef POPUP_BUTTON_COUNT #define POPUP_BUTTON_COUNT 3 menuDef { SYSTEM_POPUP_SETUP_VIS( mod_adminmenu, ;, ;, 1 ) SYSTEM_POPUP_TITLE_VIS( ( "Admin Menu\nYou can change settings in here." ), 1 ) CHOICE_DVARFLOATLIST( 1, "@OS_SETTING_WEAPON_RESPAWN", "os_weaponrespawntime", { "5" 5 "10" 10 "15" 15 "20" 20 "25" 25 "30" 30 }, ; ) CHOICE_DVARFLOATLIST( 2, "@OS_SETTING_PERK_RESPAWN", "os_perkrespawntime", { "5" 5 "10" 10 "15" 15 "20" 20 "25" 25 "30" 30 }, ; ) FRAME_CHOICE_BUTTON_VIS_EX( 3, "@MENU_OK", close self;, 1, ;) } }

ENDRESULT
[Image: 9A634C025D3A55767750FC0ACF9202DFD2A398BC]

There is images? How we make it without?


RE: Easy Menu - iAegle - 07-21-2011

(07-21-2011, 23:14)Scripts18 Wrote:
(07-21-2011, 23:11)iAegle Wrote: A lot of people wanted to know how to make an easy menu.. well this one is quite easy. I'm sure people can find out how to add buttons and such

Just look true it and change the CAPS things:
MENU NAME HERE
CONFIG NAME HERE
TITLE NAME HERE
HIGHEST IMAGE NAME HERE
LOWEST IMAGE NAME HERE
MIDDLE IMAGE NAME HERE


but post questions if you don't understand!! this thread is kinda made for questions XD

Code:
#include "ui/menudef.h" #include "ui_mp/common_macro.inc" #include "ui_mp/menustyle.inc" #include "ui_mp/choices_setup_teams.menu" { menuDef { name "MENU NAME HERE" rect 0 0 640 480 focuscolor COLOR_FOCUSED style WINDOW_STYLE_EMPTY blurWorld 7.0 onOpen { execNow exec "CONFIG NAME HERE"; } onEsc { play "mouse_click"; close self; open "team_marinesopfor"; } CHOICE_MENU_TITLE( TITLE NAME HERE ) FRAME_CHOICE_BUTTON_FOCUS_VIS_EX( 1, "About Old School", open mod_information;, ;, ;, 1, ;) FRAME_CHOICE_BUTTON_FOCUS_VIS_EX( 2, "Server Information", open mod_serverinfo;, ;, ;, 1, ;) FRAME_CHOICE_BUTTON_FOCUS_VIS_EX( 4, "Play!", close self; open "team_marinesopfor";, ;, ;, 1, ;) // gradient_top itemDef { style WINDOW_STYLE_SHADER rect 0 0 854 75 HORIZONTAL_ALIGN_FULLSCREEN 0 background "gradient_top" visible 1 decoration } // gradient_bottom itemDef { style WINDOW_STYLE_SHADER rect 0 405 854 75 HORIZONTAL_ALIGN_FULLSCREEN 0 background "gradient_bottom" visible 1 decoration } itemDef { style WINDOW_STYLE_SHADER rect 60 -185 220 370 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER background "white" forecolor 0 0 0 0.8 border 1 bordersize 1.5 bordercolor 0.5 0.5 0.5 0.8 visible 1 decoration } itemDef { rect 70 70 200 100 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER forecolor 1 1 1 1 style WINDOW_STYLE_SHADER background "LOWEST IMAGE NAME HERE" visible 1 decoration } itemDef { rect 70 -50 200 100 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER forecolor 1 1 1 1 style WINDOW_STYLE_SHADER background "MIDDLE IMAGE NAME HERE" visible 1 decoration } itemDef { rect 70 -170 200 100 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER forecolor 1 1 1 1 style WINDOW_STYLE_SHADER background "HIGHEST IMAGE NAME HERE" visible 1 decoration } #include "ui/safearea.menu" } #include "ui_mp/popupstyle.inc" #include "ui/choices_setup_popmenu.menu" #undef POPUP_BUTTON_COUNT #define POPUP_BUTTON_COUNT 1 menuDef { SYSTEM_POPUP_SETUP_VIS( mod_information, ;, ;, 1 ) SYSTEM_POPUP_TITLE_VIS( "The point of this mod is to let people play with other guns then they normally do. Pick up weapons and perks from 'pickup points' to arm yourself.\n\nMod made by iAegle.", 1 ) FRAME_CHOICE_BUTTON_VIS_EX( 1, "@MENU_OK", close self;, 1, ;) } menuDef { SYSTEM_POPUP_SETUP_VIS( mod_serverinfo, ;, ;, 1 ) SYSTEM_POPUP_TITLE_VIS( ( dvarString( os_servernote ) ), 1 ) FRAME_CHOICE_BUTTON_VIS_EX( 1, "@MENU_OK", close self;, 1, ;) } #undef POPUP_BUTTON_COUNT #define POPUP_BUTTON_COUNT 3 menuDef { SYSTEM_POPUP_SETUP_VIS( mod_adminmenu, ;, ;, 1 ) SYSTEM_POPUP_TITLE_VIS( ( "Admin Menu\nYou can change settings in here." ), 1 ) CHOICE_DVARFLOATLIST( 1, "@OS_SETTING_WEAPON_RESPAWN", "os_weaponrespawntime", { "5" 5 "10" 10 "15" 15 "20" 20 "25" 25 "30" 30 }, ; ) CHOICE_DVARFLOATLIST( 2, "@OS_SETTING_PERK_RESPAWN", "os_perkrespawntime", { "5" 5 "10" 10 "15" 15 "20" 20 "25" 25 "30" 30 }, ; ) FRAME_CHOICE_BUTTON_VIS_EX( 3, "@MENU_OK", close self;, 1, ;) } }

ENDRESULT
[Image: 9A634C025D3A55767750FC0ACF9202DFD2A398BC]

There is images? How we make it without?

Search for the itemDef {} functions with:

background HIGHEST IMAGE NAME HERE
background MIDDLE IMAGE NAME HERE
background LOWEST IMAGE NAME HERE

and completely remove those functions.

it should look like this
Code:
#include "ui/menudef.h" #include "ui_mp/common_macro.inc" #include "ui_mp/menustyle.inc" #include "ui_mp/choices_setup_teams.menu" { menuDef { name "MENU NAME HERE" rect 0 0 640 480 focuscolor COLOR_FOCUSED style WINDOW_STYLE_EMPTY blurWorld 7.0 onOpen { execNow exec "CONFIG NAME HERE"; } onEsc { play "mouse_click"; close self; open "team_marinesopfor"; } CHOICE_MENU_TITLE( TITLE NAME HERE ) FRAME_CHOICE_BUTTON_FOCUS_VIS_EX( 1, "About Old School", open mod_information;, ;, ;, 1, ;) FRAME_CHOICE_BUTTON_FOCUS_VIS_EX( 2, "Server Information", open mod_serverinfo;, ;, ;, 1, ;) FRAME_CHOICE_BUTTON_FOCUS_VIS_EX( 4, "Play!", close self; open "team_marinesopfor";, ;, ;, 1, ;) // gradient_top itemDef { style WINDOW_STYLE_SHADER rect 0 0 854 75 HORIZONTAL_ALIGN_FULLSCREEN 0 background "gradient_top" visible 1 decoration } // gradient_bottom itemDef { style WINDOW_STYLE_SHADER rect 0 405 854 75 HORIZONTAL_ALIGN_FULLSCREEN 0 background "gradient_bottom" visible 1 decoration } #include "ui/safearea.menu" } #include "ui_mp/popupstyle.inc" #include "ui/choices_setup_popmenu.menu" #undef POPUP_BUTTON_COUNT #define POPUP_BUTTON_COUNT 1 menuDef { SYSTEM_POPUP_SETUP_VIS( mod_information, ;, ;, 1 ) SYSTEM_POPUP_TITLE_VIS( "The point of this mod is to let people play with other guns then they normally do. Pick up weapons and perks from 'pickup points' to arm yourself.\n\nMod made by iAegle.", 1 ) FRAME_CHOICE_BUTTON_VIS_EX( 1, "@MENU_OK", close self;, 1, ;) } menuDef { SYSTEM_POPUP_SETUP_VIS( mod_serverinfo, ;, ;, 1 ) SYSTEM_POPUP_TITLE_VIS( ( dvarString( os_servernote ) ), 1 ) FRAME_CHOICE_BUTTON_VIS_EX( 1, "@MENU_OK", close self;, 1, ;) } #undef POPUP_BUTTON_COUNT #define POPUP_BUTTON_COUNT 3 menuDef { SYSTEM_POPUP_SETUP_VIS( mod_adminmenu, ;, ;, 1 ) SYSTEM_POPUP_TITLE_VIS( ( "Admin Menu\nYou can change settings in here." ), 1 ) CHOICE_DVARFLOATLIST( 1, "@OS_SETTING_WEAPON_RESPAWN", "os_weaponrespawntime", { "5" 5 "10" 10 "15" 15 "20" 20 "25" 25 "30" 30 }, ; ) CHOICE_DVARFLOATLIST( 2, "@OS_SETTING_PERK_RESPAWN", "os_perkrespawntime", { "5" 5 "10" 10 "15" 15 "20" 20 "25" 25 "30" 30 }, ; ) FRAME_CHOICE_BUTTON_VIS_EX( 3, "@MENU_OK", close self;, 1, ;) } }



RE: Easy Menu - Scripts18 - 07-21-2011

ok thx alot again

to open it do we do like in your quickmessage?

self openmenu(MENU NAME); ?



RE: Easy Menu - AZUMIKKEL - 07-21-2011

Thanks!

Any common menu names? Like the one when choosing a team / pausing the game?
Edit: How do I make someone open a menu lol


RE: Easy Menu - Scripts18 - 07-21-2011

(07-21-2011, 23:26)AZUMIKKEL Wrote: Thanks!

Any common menu names? Like the one when choosing a team / pausing the game?
Edit: How do I make someone open a menu lol

Its probably the same as using quickmessages


RE: Easy Menu - Lemon - 07-22-2011

Will you marry me?


RE: Easy Menu - JariZ - 07-22-2011

thats thats thats AWESOME,
like MOTD but for black ops,
THNX DUDE LOVE IT


RE: Easy Menu - Scripts18 - 07-22-2011

some questions

what the exec config is for?
how we open it in-game?

to open another menu clicking on a buttom(similar to main menu) is it possible if yes how?
or like the quickmessage you click on something it close current menu and opens another


RE: Easy Menu - master131 - 07-22-2011

(07-22-2011, 01:21)Scripts18 Wrote: some questions

what the exec config is for?
how we open it in-game?

to open another menu clicking on a buttom(similar to main menu) is it possible if yes how?
or like the quickmessage you click on something it close current menu and opens another

name "MENU NAME HERE"
Replace MENU NAME HERE with a menu name such as menu_customstuff and then somewhere, precache the menu:
precacheMenu("menu_customstuff");
and then simply use:
self openMenu("menu_customstuff");

I would assume you already know how to save the menu file and compile it into a fast file...