Add controls help to menu

This commit is contained in:
Petr Bartos 2024-04-16 18:19:16 +02:00
parent a5a5555ebe
commit e42680ca81
7 changed files with 86 additions and 5 deletions

View file

@ -99,7 +99,7 @@ itemDef
textscale .22
group grpSystembutton
style WINDOW_STYLE_FILLED
rect 106 10 100 12
rect 86 10 100 12
textalign 1
textalignx 50
textaligny 10
@ -333,7 +333,7 @@ itemDef {
textscale .22
group grpSystembutton
style WINDOW_STYLE_FILLED
rect 256 10 100 12
rect 186 10 100 12
textalign 1
textalignx 50
textaligny 10
@ -432,6 +432,26 @@ itemDef {
visible 1
}
itemDef {
name ctr_help
text "Help"
type 1
textscale .22
group grpSystembutton
style WINDOW_STYLE_FILLED
rect 286 10 100 12
textalign 1
textalignx 50
textaligny 10
forecolor 1 1 1 1
backcolor .1 .1 .1 0
visible 1
action { play "sound/misc/kcaction.wav" ;
hide grpControls ; hide comfort ; open helpPopupMenu }
mouseEnter { show message_graphics ; setitemcolor ctr_help backcolor .3 .3 .3 0 }
mouseExit { hide message_graphics ; setitemcolor ctr_help backcolor .1 .1 .1 0 }
}
// TOOLS MESSAGE //
itemDef

View file

@ -0,0 +1,41 @@
#include "ui/menudef.h"
{
menuDef
{
name helpPopupMenu
visible 0
fullScreen 0
rect 0 0 640 480
focusColor 1 1 1 1
style WINDOW_STYLE_FILLED
outOfBoundsClick
popup
onEsc { open foo }
itemDef
{
group none
name background
rect 0 0 640 480
style WINDOW_STYLE_SHADER
type ITEM_TYPE_BUTTON
background "gfx/menus/background_dim.tga"
forecolor 1 1 1 1
visible 1
action { open foo }
}
itemDef
{
group none
name scheme
rect 20 15 600 450
style WINDOW_STYLE_SHADER
background "gfx/menus/control_scheme.tga"
forecolor 1 1 1 1
visible 1
}
}
}

View file

@ -28,4 +28,5 @@
loadMenu { "ui/cheats.menu" }
loadMenu { "ui/credits.menu" }
loadMenu { "ui/help_popup.menu"}
}

View file

@ -73,7 +73,7 @@ itemDef
textscale .22
group grpSystembutton
style WINDOW_STYLE_FILLED
rect 106 10 100 12
rect 86 10 100 12
textalign 1
textalignx 50
textaligny 10
@ -307,7 +307,7 @@ itemDef {
textscale .22
group grpSystembutton
style WINDOW_STYLE_FILLED
rect 256 10 100 12
rect 186 10 100 12
textalign 1
textalignx 50
textaligny 10
@ -407,7 +407,25 @@ itemDef {
}
itemDef {
name ctr_help
text "Help"
type 1
textscale .22
group grpSystembutton
style WINDOW_STYLE_FILLED
rect 286 10 100 12
textalign 1
textalignx 50
textaligny 10
forecolor 1 1 1 1
backcolor .1 .1 .1 0
visible 1
action { play "sound/misc/kcaction.wav" ;
hide grpControls ; hide comfort ; open helpPopupMenu }
mouseEnter { show message_graphics ; setitemcolor ctr_help backcolor .3 .3 .3 0 }
mouseExit { hide message_graphics ; setitemcolor ctr_help backcolor .1 .1 .1 0 }
}
itemDef {

View file

@ -49,4 +49,5 @@
// loadMenu { "ui/createfavorite.menu" }
loadMenu { "ui/credits.menu" }
loadMenu { "ui/help_popup.menu"}
}