fork/m-overlay
git clone https://git.julia.blue/fork/m-overlay
d9a59ed
v2.1.1b
1local PANEL =class . create ( "DebugInputs" , "Panel" ) 2 3function PANEL : DebugInputs () 4self : super () 5 6self . OPTIONS =self : Add ( "Panel" ) 7self . OPTIONS : Dock ( DOCK_BOTTOM ) 8self . OPTIONS : SetHeight ( 28 ) 9self . OPTIONS : DockPadding ( 0 , 0 , 0 , 0 ) 10self . OPTIONS : DockMargin ( 0 , 0 , 0 , 0 ) 11self . OPTIONS : SetBorderColor ( color_blank ) 12 13self . OKAY =self . OPTIONS : Add ( "ButtonIcon" ) 14self . OKAY : SetImage ( "textures/gui/disk.png" ) 15self . OKAY : Dock ( DOCK_RIGHT ) 16self . OKAY : SetText ( "Save" ) 17self . OKAY : SetWidth ( 64 ) 18 19self . OKAY . OnClick =function ( this ) 20self : SetVisible ( false ) 21self . OnClosed () 22end 23 24self . CHECKPANEL =self : Add ( "CheckPanel" ) 25self . CHECKPANEL : SetText ( "Debug inputs.." ) 26self . CHECKPANEL : DockMargin ( 0 , 0 , 0 , 0 ) 27self . CHECKPANEL : Dock ( DOCK_FILL ) 28 29local buttons =self . CHECKPANEL : AddOption ( DEBUG_INPUT_BUTTONS , "Buttons" ) 30buttons : SetTooltipParent ( self . CHECKPANEL ) 31buttons : SetTooltipTitle ( "BUTTONS" ) 32buttons : SetTooltipBody ( [[Show the button values in hexadecimal.]] ) 33 34local joystick =self . CHECKPANEL : AddOption ( DEBUG_INPUT_JOYSTICK , "Joystick" ) 35joystick : SetTooltipParent ( self . CHECKPANEL ) 36joystick : SetTooltipTitle ( "JOYSTICK" ) 37joystick : SetTooltipBody ( [[Show the joystick analog values.]] ) 38 39local cstick =self . CHECKPANEL : AddOption ( DEBUG_INPUT_C_STICK , "C-Stick" ) 40cstick : SetTooltipParent ( self . CHECKPANEL ) 41cstick : SetTooltipTitle ( "C-STICK" ) 42cstick : SetTooltipBody ( [[Show the c-stick analog values.]] ) 43 44local triggers =self . CHECKPANEL : AddOption ( DEBUG_INPUT_TRIGGERS , "Triggers" ) 45triggers : SetTooltipParent ( self . CHECKPANEL ) 46triggers : SetTooltipTitle ( "TRIGGERS" ) 47triggers : SetTooltipBody ( [[Show the L/R analog values.]] ) 48end 49 50function PANEL : GetValue () 51return self . CHECKPANEL : GetValue () 52end 53 54function PANEL : SetValue ( ... ) 55return self . CHECKPANEL : SetValue ( ... ) 56end 57 58function PANEL : OnClosed () 59-- OVERRIDE 60end