From 2bb5729ba7838aa9bcc88a10f77fabcfb3f41d8e Mon Sep 17 00:00:00 2001 From: FruitieX Date: Sat, 17 Jul 2010 01:47:10 +0300 Subject: [PATCH] add gridsize to the hud configs so that the player won't have to find out which gridsize the artist used to not get the annoying snapping panels as soon as he clicks one. Unsure about luminos gridsize atm, so setting it to default (0.01, has snappy panels here...). Also add a menu_restart to the end of each skin config so the menu dialog values are enabled :) --- _hud_descriptions.cfg | 4 ++++ defaultXonotic.cfg | 3 --- hud_luminos_default.cfg | 4 ++++ hud_old_nexuiz.cfg | 4 ++++ qcsrc/client/hud.qc | 6 ++++++ 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/_hud_descriptions.cfg b/_hud_descriptions.cfg index d4ac1096e..488cfeb7b 100644 --- a/_hud_descriptions.cfg +++ b/_hud_descriptions.cfg @@ -24,6 +24,10 @@ seta hud_progressbar_nexball_color "" "R G B vector of the progress bar backgrou seta _hud_panelorder "" "contains order in which panels are to be drawn" +seta hud_configure_grid "" "snap to grid when moving/resizing panels" +seta hud_configure_grid_xsize "" "snap to X * vid_conwidth" +seta hud_configure_grid_ysize "" "snap to Y * vid_conheight" + seta hud_weaponicons "" "enable/disable this panel" seta hud_weaponicons_pos "" "position of this panel" seta hud_weaponicons_size "" "size of this panel" diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index be59bea45..9947e97b4 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1327,9 +1327,6 @@ set _hud_configure 0 "1 = configure the HUD" seta hud_configure_teamcolorforced 1 "1 = force display of team colors in configure mode" seta hud_configure_checkcollisions 1 "check for collisions against other panels when in hud configure mode" seta hud_configure_bg_minalpha 0.25 "minimum panel background alpha when in hud configure mode" -seta hud_configure_grid 1 "snap to grid when moving/resizing panels" -seta hud_configure_grid_xsize 0.01 "snap to X * vid_conwidth" -seta hud_configure_grid_ysize 0.01 "snap to Y * vid_conheight" seta hud_configure_grid_alpha 0.15 "alpha for visible grid when in configure mode" seta sbar_info_pos 0 "Y-axis distance from lower right corner for engine info prints" diff --git a/hud_luminos_default.cfg b/hud_luminos_default.cfg index ab3a55bd0..9771ba061 100644 --- a/hud_luminos_default.cfg +++ b/hud_luminos_default.cfg @@ -22,6 +22,10 @@ seta hud_progressbar_nexball_color "0.7 0.1 0" seta _hud_panelorder "6 5 9 3 1 7 12 0 4 10 2 11 14 8 13 " +seta hud_configure_grid 1 +seta hud_configure_grid_xsize 0.01 +seta hud_configure_grid_ysize 0.01 + seta hud_panel_weapons 1 seta hud_panel_weapons_pos "0.908906 0.088047" seta hud_panel_weapons_size "0.066564 0.641367" diff --git a/hud_old_nexuiz.cfg b/hud_old_nexuiz.cfg index 6d732f762..c43751dcc 100644 --- a/hud_old_nexuiz.cfg +++ b/hud_old_nexuiz.cfg @@ -12,6 +12,10 @@ seta hud_dock_color "0 0.5 0.35" seta hud_dock_color_team "0.700000" seta hud_dock_alpha "1" +seta hud_configure_grid 1 +seta hud_configure_grid_xsize 0.01 +seta hud_configure_grid_ysize 0.01 + seta hud_progressbar_alpha 0 seta hud_progressbar_strength_color "0 0 0.6" seta hud_progressbar_shield_color "0.6 0 0.6" diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index d7007fbf7..9fa3be806 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -448,6 +448,11 @@ void HUD_Panel_ExportCfg(string cfgname) fputs(fh, strcat("seta _hud_panelorder \"", cvar_string("_hud_panelorder"), "\"", "\n")); fputs(fh, "\n"); + fputs(fh, strcat("seta hud_configure_grid \"", cvar_string("hud_configure_grid"), "\"", "\n")); + fputs(fh, strcat("seta hud_configure_grid_xsize \"", cvar_string("hud_configure_grid_xsize"), "\"", "\n")); + fputs(fh, strcat("seta hud_configure_grid_ysize \"", cvar_string("hud_configure_grid_ysize"), "\"", "\n")); + fputs(fh, "\n"); + // common cvars for all panels float i; for (i = 0; i < HUD_PANEL_NUM; ++i) @@ -504,6 +509,7 @@ void HUD_Panel_ExportCfg(string cfgname) } fputs(fh, "\n"); } + fputs(fh, strcat("menu_restart", "\n")); // force a menu update when execing config, so that the dialogs are updated print("^2Successfully exported to hud_", autocvar_hud_skin, "_", cfgname, ".cfg! (Note: It's saved in data/data/)\n"); } -- 2.39.2