Skip to content

Commit

Permalink
Added demos settings pannel and keybinds
Browse files Browse the repository at this point in the history
  • Loading branch information
taskinoz committed Sep 20, 2020
1 parent d57c267 commit b7c5fab
Show file tree
Hide file tree
Showing 7 changed files with 3,338 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/resource/ui/menus/controls.menu
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,24 @@ resource/ui/menus/controls.menu
pin_corner_to_sibling TOP_LEFT
pin_to_sibling_corner BOTTOM_LEFT
navUp SwchHoldToRodeo
navDown BtnGamepadLayout
navDown DemosMenu
ConVar "sv_cheats"
list
{
"Disable" 0
"Enable" 1
}
}
DemosMenu
{
ControlName RuiButton
InheritProperties WideButton
pin_to_sibling SwchEnableCheats
pin_corner_to_sibling TOP_LEFT
pin_to_sibling_corner BOTTOM_LEFT
navUp SwchEnableCheats
navDown BtnGamepadLayout
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -317,7 +327,7 @@ resource/ui/menus/controls.menu
ControlName ImagePanel
InheritProperties SubheaderBackground
xpos 96
ypos 330
ypos 380
}
LblGamepadSubheaderText
{
Expand All @@ -338,7 +348,7 @@ resource/ui/menus/controls.menu
pin_corner_to_sibling TOP_LEFT
pin_to_sibling_corner BOTTOM_LEFT
xpos -22
navUp SwchHoldToRodeo
navUp DemosMenu
navDown SwchHoldToCrouch
tabPosition 2
}
Expand Down
174 changes: 174 additions & 0 deletions src/resource/ui/menus/demos.menu
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
resource/ui/menus/demos.menu
{
menu
{
ControlName Frame
xpos 0
ypos 0
zpos 3
wide f0
tall f0
autoResize 0
visible 1
enabled 1
pinCorner 0
PaintBackgroundType 0
infocus_bgcolor_override "0 0 0 0"
outoffocus_bgcolor_override "0 0 0 0"

Vignette
{
ControlName ImagePanel
InheritProperties MenuVignette
}

Title
{
ControlName Label
InheritProperties MenuTitle
labelText "Demos"
}

ImgTopBar
{
ControlName ImagePanel
InheritProperties MenuTopBar
}

MatchmakingStatus
{
ControlName CNestedPanel
xpos 0
ypos 0
wide f0
tall f0
visible 1
controlSettingsFile "resource/ui/menus/panels/matchmaking_status.res"
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

LblMenuItemDescription
{
ControlName Label
InheritProperties OptionMenuTooltip
classname MenuItemDescriptionClass
xpos 975
ypos 168
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

SwchEnableDemos
{
ControlName RuiButton
InheritProperties SwitchButton
xpos 120
ypos 160
tabPosition 1
style DialogListButton
navUp SwchSoundWithoutFocus
navDown SwchDemosWrite
ConVar "demo_enabledemos"
list
{
"#SETTING_OFF" 0
"#SETTING_ON" 1
}
}
SwchDemosWrite
{
ControlName RuiButton
InheritProperties SwitchButton
style DialogListButton
navUp SwchEnableDemos
navDown SwchDemosInterpolate
ConVar "demo_writeLocalFile"
list
{
"#SETTING_OFF" 0
"#SETTING_ON" 1
}

pin_to_sibling SwchEnableDemos
pin_corner_to_sibling TOP_LEFT
pin_to_sibling_corner BOTTOM_LEFT
}
SwchDemosInterpolate
{
ControlName RuiButton
InheritProperties SwitchButton
style DialogListButton
navUp SwchDemosWrite
navDown SwchDemosUpdateRate
ConVar "demo_interpolateview"
list
{
"#SETTING_OFF" 0
"#SETTING_ON" 1
}

pin_to_sibling SwchDemosWrite
pin_corner_to_sibling TOP_LEFT
pin_to_sibling_corner BOTTOM_LEFT
}
SwchDemosUpdateRate
{
ControlName RuiButton
InheritProperties SwitchButton
style DialogListButton
navUp SwchDemosInterpolate
navDown SwchDemosAutorecord
ConVar "base_tickinterval_sp"
list
{
"20 FPS" 0.05
"60 FPS" 0.016666667
"100 FPS" 0.010000
}

pin_to_sibling SwchDemosInterpolate
pin_corner_to_sibling TOP_LEFT
pin_to_sibling_corner BOTTOM_LEFT
}
SwchDemosAutorecord
{
ControlName RuiButton
InheritProperties SwitchButton
style DialogListButton
navUp SwchDemosUpdateRate
navDown BtnMouseKeyboardBindings
ConVar "demo_autoRecord"
list
{
"#SETTING_OFF" 0
"#SETTING_ON" 1
}

pin_to_sibling SwchDemosUpdateRate
pin_corner_to_sibling TOP_LEFT
pin_to_sibling_corner BOTTOM_LEFT
}

// Mouse/Keyboard options
BtnMouseKeyboardBindings [!$GAMECONSOLE]
{
ControlName RuiButton
InheritProperties WideButton
pin_to_sibling SwchDemosAutorecord
pin_corner_to_sibling TOP_LEFT
pin_to_sibling_corner BOTTOM_LEFT
ypos 30
navUp SwchDemosAutorecord
navDown SwchEnableDemos
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

FooterButtons
{
ControlName CNestedPanel
InheritProperties FooterButtons
}
}
}
6 changes: 6 additions & 0 deletions src/scripts/kb_act.lst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
"give mp_weapon_shotgun" "Spawn EVA Shotgun"
"give mp_weapon_epg" "Spawn EPG"
"blank" "=========================="
"blank" "DEMOS"
"blank" "=========================="
"_record demo" "Record Demo Increment"
"record demo" "Record Demo"
"stop" "Stop Recording"
"blank" "=========================="
"blank" "EXTRAS"
"blank" "=========================="
"toggle sv_gravity 200 750" "Low Gravity"
Expand Down
Loading

0 comments on commit b7c5fab

Please sign in to comment.