OpenMoHAA 0.82.1
Loading...
Searching...
No Matches
cl_uibind.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 bind_item_t
26{
27public:
28 str name;
29 str command;
30 UIReggedMaterial *nameMaterial;
31
32 bind_item_t();
33 bind_item_t(str name, str command, UIReggedMaterial *nameMaterial);
34};
35
36inline bind_item_t::bind_item_t()
37{
38 nameMaterial = NULL;
39}
40
41inline bind_item_t::bind_item_t(str name, str command, UIReggedMaterial *nameMaterial)
42{
43 this->name = name;
44 this->command = command;
45 this->nameMaterial = nameMaterial;
46}
47
48class bind_t
49{
50public:
51 int width;
52 int height;
53 int fillwidth;
54 int commandwidth;
55 int commandheight;
56 int primarykeywidth;
57 int primarykeyheight;
58 int alternatekeywidth;
59 int alternatekeyheight;
60 int align;
61 UColor titlebgcolor;
62 UColor titlefgcolor;
63 UColor activefgcolor;
64 UColor activebgcolor;
65 UColor activebordercolor;
66 UColor inactivefgcolor;
67 UColor inactivebgcolor;
68 UColor highlightfgcolor;
69 UColor highlightbgcolor;
70 UColor selectfgcolor;
71 UColor selectbgcolor;
72 str changesound;
73 str activesound;
74 str entersound;
75 str headers[3];
76 UIReggedMaterial *headermats[3];
77 UIReggedMaterial *fillmaterial;
79
80public:
81 bind_t();
82 ~bind_t();
83
84 void Clear(void);
85};
86
87class bindlistener : public Listener
88{
89protected:
90 bind_t *bind;
91
92public:
93 CLASS_PROTOTYPE(bindlistener);
94
95public:
96 bindlistener();
97 bindlistener(bind_t *b);
98
99 bool Load(Script& script);
100 void Header(Event *ev);
101 void Width(Event *ev);
102 void FillWidth(Event *ev);
103 void Height(Event *ev);
104 void CommandWidth(Event *ev);
105 void CommandHeight(Event *ev);
106 void PrimaryKeyWidth(Event *ev);
107 void PrimaryKeyHeight(Event *ev);
108 void AlternateKeyWidth(Event *ev);
109 void AlternateKeyHeight(Event *ev);
110 void NewItem(Event *ev);
111 void Align(Event *ev);
112 void TitleForegroundColor(Event *ev);
113 void TitleBackgroundColor(Event *ev);
114 void InactiveForegroundColor(Event *ev);
115 void InactiveBackgroundColor(Event *ev);
116 void ActiveForegroundColor(Event *ev);
117 void ActiveBackgroundColor(Event *ev);
118 void ActiveBorderColor(Event *ev);
119 void HighlightForegroundColor(Event *ev);
120 void HighlightBackgroundColor(Event *ev);
121 void SelectForegroundColor(Event *ev);
122 void SelectBackgroundColor(Event *ev);
123 void ChangeSound(Event *ev);
124 void ActiveSound(Event *ev);
125 void EnterSound(Event *ev);
126};
127
128bool CL_LoadBind(const char *filename, bind_t *bind);
Definition container.h:85
Definition listener.h:246
Definition script.h:60
Definition ucolor.h:26
Definition uiwidget.h:36
Definition cl_uibind.h:49
Definition str.h:77