From: Samual Date: Tue, 17 Jan 2012 01:58:29 +0000 (-0500) Subject: Add blank crosshair and model settings dialogs X-Git-Tag: xonotic-v0.6.0~150 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=56f73ee470db6edc0d1b405ee1cce17fb8ab5dd3;p=xonotic%2Fxonotic-data.pk3dir.git Add blank crosshair and model settings dialogs --- diff --git a/qcsrc/menu/classes.c b/qcsrc/menu/classes.c index 44141dfcd..87769c806 100644 --- a/qcsrc/menu/classes.c +++ b/qcsrc/menu/classes.c @@ -80,7 +80,9 @@ #include "xonotic/dialog_credits.c" #include "xonotic/credits.c" #include "xonotic/dialog_multiplayer_playersetup_hudconfirm.c" +#include "xonotic/dialog_multiplayer_playersetup_model.c" #include "xonotic/dialog_multiplayer_playersetup_view.c" +#include "xonotic/dialog_multiplayer_playersetup_crosshair.c" #include "xonotic/dialog_multiplayer_playersetup_weapons.c" #include "xonotic/weaponslist.c" #include "xonotic/dialog_multiplayer_demo.c" diff --git a/qcsrc/menu/skin-customizables.inc b/qcsrc/menu/skin-customizables.inc index 5449cd916..d9f32efd5 100644 --- a/qcsrc/menu/skin-customizables.inc +++ b/qcsrc/menu/skin-customizables.inc @@ -65,6 +65,8 @@ SKINBEGIN SKINVECTOR(COLOR_DIALOG_CREDITS, '0.7 0.7 1'); SKINVECTOR(COLOR_DIALOG_WEAPONS, '1 0.7 0.7'); SKINVECTOR(COLOR_DIALOG_VIEW, '1 0.7 0.7'); + SKINVECTOR(COLOR_DIALOG_MODEL, '1 0.7 0.7'); + SKINVECTOR(COLOR_DIALOG_CROSSHAIR, '1 0.7 0.7'); SKINVECTOR(COLOR_DIALOG_SERVERINFO, '0.7 0.7 1'); SKINVECTOR(COLOR_DIALOG_CVARS, '1 0 0'); SKINVECTOR(COLOR_DIALOG_HUDCONFIRM, '1 0 0'); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c index 4f7bd1168..85060dca9 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c @@ -149,16 +149,16 @@ void XonoticPlayerSettingsTab_fill(entity me) me.TR(me); me.TDempty(me, 0.5); me.TD(me, 1, 2, e = makeXonoticButton(_("Other crosshair settings"), '0 0 0')); - e.onClick = HUDSetup_Start; - e.onClickEntity = me; + e.onClick = DialogOpenButton_Click; + e.onClickEntity = main.crosshairDialog; setDependent(e, "crosshair_enabled", 1, 2); // TODO: show status of crosshair dot and hittest and pickups and such here with text me.TR(me); me.TR(me); me.TDempty(me, 0.5); me.TD(me, 1, 2, e = makeXonoticButton(_("Model settings"), '0 0 0')); - e.onClick = HUDSetup_Start; - e.onClickEntity = me; + e.onClick = DialogOpenButton_Click; + e.onClickEntity = main.modelDialog; // TODO: show csqc model settings like forcemyplayer and deglowing/ghosting bodies with text here me.TR(me); me.TDempty(me, 0.5); @@ -171,7 +171,7 @@ void XonoticPlayerSettingsTab_fill(entity me) me.TD(me, 1, 2, e = makeXonoticButton(_("Weapon settings"), '0 0 0')); e.onClick = DialogOpenButton_Click; e.onClickEntity = main.weaponsDialog; - // I don't really think this is useful, and especially it doesn't look very clean... + // I don't really think this is useful as is, and especially it doesn't look very clean... // In the future, if ALL of these buttons had some information, then it would be justified/clean //me.TD(me, 1, 1, e0 = makeXonoticTextLabel(0, string_null)); // e0.textEntity = main.weaponsDialog; diff --git a/qcsrc/menu/xonotic/mainwindow.c b/qcsrc/menu/xonotic/mainwindow.c index 9054bef6a..291e02338 100644 --- a/qcsrc/menu/xonotic/mainwindow.c +++ b/qcsrc/menu/xonotic/mainwindow.c @@ -12,6 +12,8 @@ CLASS(MainWindow) EXTENDS(ModalController) ATTRIB(MainWindow, serverInfoDialog, entity, NULL) ATTRIB(MainWindow, cvarsDialog, entity, NULL) ATTRIB(MainWindow, viewDialog, entity, NULL) + ATTRIB(MainWindow, modelDialog, entity, NULL) + ATTRIB(MainWindow, crosshairDialog, entity, NULL) ATTRIB(MainWindow, hudconfirmDialog, entity, NULL) ATTRIB(MainWindow, mainNexposee, entity, NULL) ATTRIB(MainWindow, fadedAlpha, float, SKINALPHA_BEHIND) @@ -167,6 +169,14 @@ void MainWindow_configureMainWindow(entity me) i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); + me.modelDialog = i = spawnXonoticModelDialog(); + i.configureDialog(i); + me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); + + me.crosshairDialog = i = spawnXonoticCrosshairDialog(); + i.configureDialog(i); + me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); + me.mainNexposee = n = spawnXonoticNexposee(); /* if(checkextension("DP_GECKO_SUPPORT"))