]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Improve sorting of the Settings > Game list
authorotta8634 <k9wolf@pm.me>
Sat, 8 Feb 2025 17:25:13 +0000 (01:25 +0800)
committerotta8634 <k9wolf@pm.me>
Fri, 14 Mar 2025 16:33:04 +0000 (00:33 +0800)
Did what seemed most logical: View, HUD, Crosshair, Weapons, Models, Messages, Damage text.
This is an improvement over the previous alphabetical sorting with Damage text tacked on to the end.
Additionally View is now first, which contains Field of view, so is quite important.

qcsrc/common/mutators/mutator/damagetext/ui_damagetext.qh
qcsrc/menu/gamesettings.qh
qcsrc/menu/xonotic/dialog_settings_game_crosshair.qh
qcsrc/menu/xonotic/dialog_settings_game_hud.qh
qcsrc/menu/xonotic/dialog_settings_game_messages.qh
qcsrc/menu/xonotic/dialog_settings_game_model.qh
qcsrc/menu/xonotic/dialog_settings_game_view.qh
qcsrc/menu/xonotic/dialog_settings_game_weapons.qh

index f480ea433478c94079daa148c0efe074d85caf53..069fa9595414e998ed20d90b7b04d8088fa5da5c 100644 (file)
@@ -10,4 +10,3 @@ CLASS(XonoticDamageTextSettings, XonoticTab)
        ATTRIB(XonoticDamageTextSettings, columns, float, 5);
 ENDCLASS(XonoticDamageTextSettings)
 entity makeXonoticDamageTextSettingsTab();
-REGISTER_SETTINGS(damagetext, makeXonoticDamageTextSettingsTab());
index 291b55b27aefff385e756c294ffcfc9a4b4067a9..8e38d2d16565d99ea173d03bb4acf881ba3cb33b 100644 (file)
@@ -1,15 +1,25 @@
 #pragma once
 
-#ifdef MENUQC
-
-#include "xonotic/tab.qh"
+#include "xonotic/dialog_settings_game_hud.qh"
+#include "xonotic/dialog_settings_game_crosshair.qh"
+#include "xonotic/dialog_settings_game_messages.qh"
+#include "xonotic/dialog_settings_game_model.qh"
+#include "xonotic/dialog_settings_game_view.qh"
+#include "xonotic/dialog_settings_game_weapons.qh"
+#include <common/mutators/mutator/damagetext/ui_damagetext.qh>
 
 REGISTRY(Settings, BITS(3))
 REGISTER_REGISTRY(Settings)
 
 REGISTRY_DEFINE_GET(Settings, NULL)
 #define REGISTER_SETTINGS(id, impl) \
-    LAZY_NEW(id, impl) \
-    REGISTER(Settings, MENU, id, m_id, NEW(Lazy, LAZY(id)))
+       LAZY_NEW(id, impl) \
+       REGISTER(Settings, MENU, id, m_id, NEW(Lazy, LAZY(id)))
 
-#endif
+REGISTER_SETTINGS(View,       makeXonoticGameViewSettingsTab());
+REGISTER_SETTINGS(HUD,        makeXonoticGameHUDSettingsTab());
+REGISTER_SETTINGS(Crosshair,  makeXonoticGameCrosshairSettingsTab());
+REGISTER_SETTINGS(Weapons,    makeXonoticGameWeaponsSettingsTab());
+REGISTER_SETTINGS(Models,     makeXonoticGameModelSettingsTab());
+REGISTER_SETTINGS(Messages,   makeXonoticGameMessageSettingsTab());
+REGISTER_SETTINGS(damagetext, makeXonoticDamageTextSettingsTab());
index 33576a3ec0a3ffdd0a5bd5ce7f59f4b07afb51fa..44c5d0d41f980f1bd38aac709a93dab9845d9871 100644 (file)
@@ -10,6 +10,3 @@ CLASS(XonoticGameCrosshairSettingsTab, XonoticTab)
        ATTRIB(XonoticGameCrosshairSettingsTab, columns, float, 6.2);
 ENDCLASS(XonoticGameCrosshairSettingsTab)
 entity makeXonoticGameCrosshairSettingsTab();
-
-#include "../gamesettings.qh"
-REGISTER_SETTINGS(Crosshair, makeXonoticGameCrosshairSettingsTab());
index a9851dc63414255e95a64b301797ee9c8d9c0462..a6a288d4318d941db5c72bd380dfd6365df77a77 100644 (file)
@@ -11,5 +11,3 @@ CLASS(XonoticGameHUDSettingsTab, XonoticTab)
 ENDCLASS(XonoticGameHUDSettingsTab)
 entity makeXonoticGameHUDSettingsTab();
 void HUDSetup_Start(entity me, entity btn);
-#include "../gamesettings.qh"
-REGISTER_SETTINGS(HUD, makeXonoticGameHUDSettingsTab());
index 28a7698626368175b407ae3b2e2accc7c26084e8..c283c81dbc426d2aeaacfa0c5a3b44c5684d01c6 100644 (file)
@@ -11,5 +11,3 @@ CLASS(XonoticGameMessageSettingsTab, XonoticTab)
        ATTRIB(XonoticGameMessageSettingsTab, weaponsList, entity);
 ENDCLASS(XonoticGameMessageSettingsTab)
 entity makeXonoticGameMessageSettingsTab();
-#include "../gamesettings.qh"
-REGISTER_SETTINGS(Messages, makeXonoticGameMessageSettingsTab());
index c3caabee724b3f4a4c7bc620a0e09f1e7f55d93b..c5160e32a50c16e42f40af65a3bfb1bade1e27a8 100644 (file)
@@ -11,5 +11,3 @@ CLASS(XonoticGameModelSettingsTab, XonoticTab)
        ATTRIB(XonoticGameModelSettingsTab, columns, float, 5);
 ENDCLASS(XonoticGameModelSettingsTab)
 entity makeXonoticGameModelSettingsTab();
-#include "../gamesettings.qh"
-REGISTER_SETTINGS(Models, makeXonoticGameModelSettingsTab());
index f9d6001199b740f6555230112c19fd616fc22971..4245f8e51fafe33f4dd62871a66d41026058d8ec 100644 (file)
@@ -10,5 +10,3 @@ CLASS(XonoticGameViewSettingsTab, XonoticTab)
        ATTRIB(XonoticGameViewSettingsTab, columns, float, 6.2);
 ENDCLASS(XonoticGameViewSettingsTab)
 entity makeXonoticGameViewSettingsTab();
-#include "../gamesettings.qh"
-REGISTER_SETTINGS(View, makeXonoticGameViewSettingsTab());
index ded41a5abdeb25963cccdef129ba591642df879a..1cf5f2d5d1788f5a8c836f762187e9dbdafc6dc5 100644 (file)
@@ -11,5 +11,3 @@ CLASS(XonoticGameWeaponsSettingsTab, XonoticTab)
        ATTRIB(XonoticGameWeaponsSettingsTab, weaponsList, entity);
 ENDCLASS(XonoticGameWeaponsSettingsTab)
 entity makeXonoticGameWeaponsSettingsTab();
-#include "../gamesettings.qh"
-REGISTER_SETTINGS(Weapons, makeXonoticGameWeaponsSettingsTab());