blob: 3e4d0ede7227d412db13f445e145ad0528b13b97 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================
#ifndef KEYBINDINGHELPDIALOG_H
#define KEYBINDINGHELPDIALOG_H
#ifdef _WIN32
#pragma once
#endif
#include "vgui_controls/Frame.h"
#include "vgui/KeyCode.h"
namespace vgui
{
class ListPanel;
class CKeyBoardEditorDialog;
//-----------------------------------------------------------------------------
// Purpose: Dialog for use in editing keybindings
//-----------------------------------------------------------------------------
class CKeyBindingHelpDialog : public Frame
{
DECLARE_CLASS_SIMPLE( CKeyBindingHelpDialog, Frame );
public:
CKeyBindingHelpDialog( Panel *parent, Panel *panelToView, KeyBindingContextHandle_t handle, KeyCode code, int modifiers );
~CKeyBindingHelpDialog();
virtual void OnCommand( char const *cmd );
virtual void OnKeyCodeTyped(vgui::KeyCode code);
// The key originally bound to help was pressed
void HelpKeyPressed();
private:
virtual void OnTick();
bool IsHelpKeyStillBeingHeld();
void PopulateList();
void GetMappingList( Panel *panel, CUtlVector< PanelKeyBindingMap * >& maps );
void AnsiText( char const *token, char *out, size_t buflen );
vgui::PHandle m_hPanel;
KeyBindingContextHandle_t m_Handle;
KeyCode m_KeyCode;
int m_Modifiers;
ListPanel *m_pList;
double m_flShowTime;
bool m_bPermanent;
DHANDLE< CKeyBoardEditorDialog > m_hKeyBindingsEditor;
};
}
#endif // KEYBINDINGHELPDIALOG_H
|