OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
uibindlist.h
1/*
2===========================================================================
3Copyright (C) 2023 the OpenMoHAA team
4
5This file is part of OpenMoHAA source code.
6
7OpenMoHAA source code is free software; you can redistribute it
8and/or modify it under the terms of the GNU General Public License as
9published by the Free Software Foundation; either version 2 of the License,
10or (at your option) any later version.
11
12OpenMoHAA source code is distributed in the hope that it will be
13useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with OpenMoHAA source code; if not, write to the Free Software
19Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20===========================================================================
21*/
22
23#pragma once
24
25class UIFakkBindList : public UIWidget
26{
27 bool m_created;
28 UIVertScroll *m_scroll;
29 UIReggedMaterial *m_presskey_mat;
30 UILabel *m_presskey_wid;
31 Container<UIWidget *> m_widgetlist;
32 Container<UIWidget *> m_miscwidgets;
33 int m_activerow;
34 int m_activeitem;
35 bind_t *m_bind;
36
37public:
38 CLASS_PROTOTYPE(UIFakkBindList);
39
40private:
41 void CreateBindWidgets(void);
42 void DestroyBindWidgets(void);
43 void RepositionBindWidgets(void);
44 void DrawPressKey(UIRect2D frame);
45
46protected:
47 void FrameInitialized(void) override;
48 void Filename(Event *ev);
49 void StopBind(Event *ev);
50
51public:
52 UIFakkBindList();
53 ~UIFakkBindList();
54
55 void setBind(bind_t *b);
56 void Draw(void) override;
57 bool isDying(void);
58 qboolean KeyEvent(int key, unsigned int time) override;
59 void Highlight(UIWidget *wid);
60 void PlayEnterSound(void);
61 qboolean SetActiveRow(UIWidget *w);
62 void Realign(void) override;
63};
64
65class UIFakkBindListLabel : public UILabel
66{
67 UIFakkBindList *m_list;
68
69public:
70 CLASS_PROTOTYPE(UIFakkBindListLabel);
71
72public:
73 UIFakkBindListLabel();
74 UIFakkBindListLabel(UIFakkBindList *list);
75
76 void Pressed(Event *ev);
77 void Draw(void) override;
78};
79
80extern Event EV_UIFakkBindList_Filename;
81extern Event EV_UIFakkBindList_StopBind;
Definition container.h:85
Definition listener.h:246
Definition uibindlist.h:26
Definition uilabel.h:42
Definition uirect2d.h:28
Definition uiwidget.h:35
Definition uivertscroll.h:31
Definition cl_uibind.h:49