]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_settings_game.qh
Merge branch 'martin-t/msnt' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_settings_game.qh
1 #pragma once
2
3 #include "datasource.qh"
4 CLASS(SettingSource, DataSource)
5         METHOD(SettingSource, getEntry, entity(entity this, int i, void(string name, string icon) returns));
6         METHOD(SettingSource, getEntryTooltip, entity(entity this, int i, void(string theTooltip) returns));
7         METHOD(SettingSource, reload, int(entity this, string filter));
8 ENDCLASS(SettingSource)
9
10 #include "listbox.qh"
11 CLASS(XonoticRegisteredSettingsList, XonoticListBox)
12         ATTRIB(XonoticRegisteredSettingsList, alphaBG, float, 0);
13         ATTRIB(XonoticRegisteredSettingsList, itemAbsSize, vector, '0 0 0');
14         ATTRIB(XonoticRegisteredSettingsList, origin, vector, '0 0 0');
15         ATTRIB(XonoticRegisteredSettingsList, realFontSize, vector, '0 0 0');
16         ATTRIB(XonoticRegisteredSettingsList, realUpperMargin, float, 0);
17         ATTRIB(XonoticRegisteredSettingsList, rowsPerItem, float, 2);
18         ATTRIB(XonoticRegisteredSettingsList, stringFilterBox, entity);
19         ATTRIB(XonoticRegisteredSettingsList, stringFilter, string);
20         ATTRIB(XonoticRegisteredSettingsList, typeToSearchString, string);
21         ATTRIB(XonoticRegisteredSettingsList, typeToSearchTime, float, 0);
22         ATTRIB(XonoticRegisteredSettingsList, source, DataSource);
23         ATTRIB(XonoticRegisteredSettingsList, onChange, void(entity, entity));
24         ATTRIB(XonoticRegisteredSettingsList, onChangeEntity, entity);
25         METHOD(XonoticRegisteredSettingsList, focusedItemChangeNotify, void(entity));
26         METHOD(XonoticRegisteredSettingsList, drawListBoxItem, void(entity this, int i, vector absSize, bool isSelected, bool isFocused));
27         METHOD(XonoticRegisteredSettingsList, focusedItemChangeNotify, void(entity this));
28         METHOD(XonoticRegisteredSettingsList, refilter, void(entity this));
29         METHOD(XonoticRegisteredSettingsList, resizeNotify, void(entity this, vector relOrigin, vector relSize, vector absOrigin, vector absSize));
30         METHOD(XonoticRegisteredSettingsList, setSelected, void(entity this, int i));
31         CONSTRUCTOR(XonoticRegisteredSettingsList, DataSource _source);
32 ENDCLASS(XonoticRegisteredSettingsList)
33
34 #include "tab.qh"
35 CLASS(XonoticGameSettingsTab, XonoticTab)
36         ATTRIB(XonoticGameSettingsTab, intendedWidth, float, 0.9);
37         ATTRIB(XonoticGameSettingsTab, rows, float, 15.5);
38         ATTRIB(XonoticGameSettingsTab, columns, float, 6.5);
39         ATTRIB(XonoticGameSettingsTab, source, DataSource, NEW(SettingSource));
40         ATTRIB(XonoticGameSettingsTab, topicList, entity, NEW(XonoticRegisteredSettingsList, this.source));
41         ATTRIB(XonoticGameSettingsTab, currentPanel, entity, NEW(XonoticTab));
42         ATTRIB(XonoticGameSettingsTab, currentItem, entity);
43         METHOD(XonoticGameSettingsTab, topicChangeNotify, void(entity, entity this));
44         METHOD(XonoticGameSettingsTab, fill, void(entity this));
45         INIT(XonoticGameSettingsTab)
46     {
47         this.configureDialog(this);
48     }
49 ENDCLASS(XonoticGameSettingsTab)