duzyjohny
31st August 2016, 01:50
Hello!
After 3 years I returned to CoD2 and to create Zombie Mod, I forgot a lot of things ... and I hope you will help me .
I created the Edit button in menu_weapon_american , which is the choice of weapons, but I can't open it any menu , maybe I am doing something wrong ...
Precache:
precacheMenu(game["menu_editmenu"]);
game["menu_editmenu"] = "editmenu";
Edit Button:
itemDef
{
name "button_Edit"
visible 1
rect 0 0 128 24
origin ORIGIN_CHOICE5
forecolor GLOBAL_UNFOCUSED_COLOR
type ITEM_TYPE_BUTTON
text "^2E^7dit^1*"
textfont UI_FONT_NORMAL
textscale GLOBAL_TEXT_SIZE
textstyle ITEM_TEXTSTYLE_SHADOWED
textaligny 20
action
{
play "mouse_click";
scriptMenuResponse "editmenu";
closemenu weapon_american;
}
onFocus
{
play "mouse_over";
}
}
Response:
if(response == "editmenu")
{
self openmenu(game["menu_editmenu"]);
}
And Editmenu:
{
menuDef
{
name "editmenu"
rect 0 0 640 480
focuscolor GLOBAL_FOCUSED_COLOR
style WINDOW_STYLE_EMPTY
blurWorld 5.0
onEsc
{
close editmenu;
}
onOpen
{
show ed1;
}
// Gradient
itemDef
{
style WINDOW_STYLE_SHADER
//rect -107 0 554 480
rect 0 0 640 480 HORIZONTAL_ALIGN_FULLSCREEN VERTICAL_ALIGN_FULLSCREEN
background "gradient"
visible 1
decoration
}
itemDef
{
name "window_background2"
visible 1
rect 0 0 10000 1000
origin ORIGIN_CHOICE99
style WINDOW_STYLE_FILLED
forecolor 1 1 1 1
backcolor 0 0 0 0.798
decoration
}
itemDef
{
name "info"
style WINDOW_STYLE_FILLED
rect 340 70 300 300
backcolor 0 0 0 .8
border 1
bordercolor 1 1 1 1
visible 1
decoration
}
//#include "ui/bars.menu"
itemDef
{
type ITEM_TYPE_TEXT
visible 1
origin ORIGIN_TITLE
forecolor 1 1 1 1
text "^2E^7dit^1*"
textfont UI_FONT_NORMAL
textscale GLOBAL_HEADER_SIZE
decoration
}
itemDef
{
type ITEM_TYPE_TEXT
visible 1
origin ORIGIN_TITLE2
forecolor 1 1 1 1
text ""
textfont UI_FONT_NORMAL
textscale .38
decoration
}
itemDef
{
type ITEM_TYPE_TEXT
visible 1
origin ORIGIN_TITLE3
forecolor 1 1 1 1
text ""
textfont UI_FONT_NORMAL
textscale .20
decoration
}
/////////////////////////////////////////////////////////////////////////////////////////////////
itemDef
{
name "ed1"
visible 1
rect 0 0 128 24
origin ORIGIN_CHOICE1
forecolor GLOBAL_UNFOCUSED_COLOR
type ITEM_TYPE_BUTTON
text "1234"
textfont UI_FONT_NORMAL
textscale .30
textstyle ITEM_TEXTSTYLE_SHADOWED
textaligny 20
action
{
play "mouse_click";
scriptMenuResponse "ed1";
}
onFocus
{
play "mouse_over";
//close ed1;
}
}
////////////////////////////////////////////////////
itemDef
{
name "ed1"
type ITEM_TYPE_TEXT
visible 1
origin ORIGIN_INFO_TEXT
forecolor 1 1 1 1
text "PickUp"
textfont UI_FONT_NORMAL
textscale .35
decoration
}
}
}
what is wrong :(
After 3 years I returned to CoD2 and to create Zombie Mod, I forgot a lot of things ... and I hope you will help me .
I created the Edit button in menu_weapon_american , which is the choice of weapons, but I can't open it any menu , maybe I am doing something wrong ...
Precache:
precacheMenu(game["menu_editmenu"]);
game["menu_editmenu"] = "editmenu";
Edit Button:
itemDef
{
name "button_Edit"
visible 1
rect 0 0 128 24
origin ORIGIN_CHOICE5
forecolor GLOBAL_UNFOCUSED_COLOR
type ITEM_TYPE_BUTTON
text "^2E^7dit^1*"
textfont UI_FONT_NORMAL
textscale GLOBAL_TEXT_SIZE
textstyle ITEM_TEXTSTYLE_SHADOWED
textaligny 20
action
{
play "mouse_click";
scriptMenuResponse "editmenu";
closemenu weapon_american;
}
onFocus
{
play "mouse_over";
}
}
Response:
if(response == "editmenu")
{
self openmenu(game["menu_editmenu"]);
}
And Editmenu:
{
menuDef
{
name "editmenu"
rect 0 0 640 480
focuscolor GLOBAL_FOCUSED_COLOR
style WINDOW_STYLE_EMPTY
blurWorld 5.0
onEsc
{
close editmenu;
}
onOpen
{
show ed1;
}
// Gradient
itemDef
{
style WINDOW_STYLE_SHADER
//rect -107 0 554 480
rect 0 0 640 480 HORIZONTAL_ALIGN_FULLSCREEN VERTICAL_ALIGN_FULLSCREEN
background "gradient"
visible 1
decoration
}
itemDef
{
name "window_background2"
visible 1
rect 0 0 10000 1000
origin ORIGIN_CHOICE99
style WINDOW_STYLE_FILLED
forecolor 1 1 1 1
backcolor 0 0 0 0.798
decoration
}
itemDef
{
name "info"
style WINDOW_STYLE_FILLED
rect 340 70 300 300
backcolor 0 0 0 .8
border 1
bordercolor 1 1 1 1
visible 1
decoration
}
//#include "ui/bars.menu"
itemDef
{
type ITEM_TYPE_TEXT
visible 1
origin ORIGIN_TITLE
forecolor 1 1 1 1
text "^2E^7dit^1*"
textfont UI_FONT_NORMAL
textscale GLOBAL_HEADER_SIZE
decoration
}
itemDef
{
type ITEM_TYPE_TEXT
visible 1
origin ORIGIN_TITLE2
forecolor 1 1 1 1
text ""
textfont UI_FONT_NORMAL
textscale .38
decoration
}
itemDef
{
type ITEM_TYPE_TEXT
visible 1
origin ORIGIN_TITLE3
forecolor 1 1 1 1
text ""
textfont UI_FONT_NORMAL
textscale .20
decoration
}
/////////////////////////////////////////////////////////////////////////////////////////////////
itemDef
{
name "ed1"
visible 1
rect 0 0 128 24
origin ORIGIN_CHOICE1
forecolor GLOBAL_UNFOCUSED_COLOR
type ITEM_TYPE_BUTTON
text "1234"
textfont UI_FONT_NORMAL
textscale .30
textstyle ITEM_TEXTSTYLE_SHADOWED
textaligny 20
action
{
play "mouse_click";
scriptMenuResponse "ed1";
}
onFocus
{
play "mouse_over";
//close ed1;
}
}
////////////////////////////////////////////////////
itemDef
{
name "ed1"
type ITEM_TYPE_TEXT
visible 1
origin ORIGIN_INFO_TEXT
forecolor 1 1 1 1
text "PickUp"
textfont UI_FONT_NORMAL
textscale .35
decoration
}
}
}
what is wrong :(