]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
luminos_xhair hud config, plus bunch of code changes to make it possible
authorFruitieX <fruitiex@gmail.com>
Mon, 29 Nov 2010 18:45:37 +0000 (20:45 +0200)
committerFruitieX <fruitiex@gmail.com>
Mon, 29 Nov 2010 18:45:37 +0000 (20:45 +0200)
16 files changed:
_hud_descriptions.cfg
defaultXonotic.cfg
gfx/hud/luminos_xhair/ammo_bullets.tga [new file with mode: 0644]
gfx/hud/luminos_xhair/ammo_cells.tga [new file with mode: 0644]
gfx/hud/luminos_xhair/ammo_current_bg.tga [new file with mode: 0644]
gfx/hud/luminos_xhair/ammo_rockets.tga [new file with mode: 0644]
gfx/hud/luminos_xhair/ammo_shells.tga [new file with mode: 0644]
gfx/hud/luminos_xhair/border_healtharmor.tga [new file with mode: 0644]
gfx/hud/luminos_xhair/progressbar_ammo.tga [new file with mode: 0644]
gfx/hud/luminos_xhair/progressbar_armor_vertical.tga [new file with mode: 0644]
gfx/hud/luminos_xhair/progressbar_health_vertical.tga [new file with mode: 0644]
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_xhair_minimal.cfg [new file with mode: 0644]
hud_nexuiz.cfg
qcsrc/client/hud.qc

index 393f9eacb8765dfe1b7bbfc199ab06f839bdd1d9..932e95bf9fb4577a7e0e7afe2cf7398c1a09de46 100644 (file)
@@ -59,6 +59,10 @@ seta hud_panel_ammo_bg_color_team "" "override panel color with team color in te
 seta hud_panel_ammo_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
 seta hud_panel_ammo_bg_border "" "if set to something else than \"\" = override default size of border around the background"
 seta hud_panel_ammo_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
+seta hud_panel_ammo_progressbar "" "use progressbar behind ammo icons"
+seta hud_panel_ammo_progressbar_xoffset "" "percentage of mySize_x to offset progressbar with"
+seta hud_panel_ammo_progressbar_name "" "name of progressbar to use behind ammo icons"
+seta hud_panel_ammo_text "" "show text/icons in the ammo panel"
 
 seta hud_panel_powerups "" "enable/disable this panel"
 seta hud_panel_powerups_pos "" "position of this panel"
@@ -75,7 +79,7 @@ seta hud_panel_powerups_bg_padding "" "if set to something else than \"\" = over
 seta hud_panel_powerups_progressbar "" "enable progressbar in panel"
 seta hud_panel_powerups_progressbar_strength "" "progressbar image for strength"
 seta hud_panel_powerups_progressbar_shield "" "progressbar image for shield"
-seta hud_panel_powerups_text "1" "show text/icons in the powerups panel"
+seta hud_panel_powerups_text "" "show text/icons in the powerups panel"
 
 seta hud_panel_healtharmor "" "enable/disable this panel, 2 = combined health/armor display"
 seta hud_panel_healtharmor_pos "" "position of this panel"
@@ -92,7 +96,7 @@ seta hud_panel_healtharmor_bg_padding "" "if set to something else than \"\" = o
 seta hud_panel_healtharmor_progressbar "" "enable progressbar in panel"
 seta hud_panel_healtharmor_progressbar_health "" "progressbar image for health"
 seta hud_panel_healtharmor_progressbar_armor "" "progressbar image for armor"
-seta hud_panel_healtharmor_text "1" "show text/icons in the healtharmor panel"
+seta hud_panel_healtharmor_text "" "show text/icons in the healtharmor panel"
 
 seta hud_panel_notify "" "enable/disable this panel"
 seta hud_panel_notify_pos "" "position of this base of the panel"
index ba732aed928932ae35959f9d7f82e5fb456b355c..1891e2be2f0eb64e616b71462d50d8aef057456a 100644 (file)
@@ -1348,6 +1348,8 @@ seta hud_panel_weapons_ammo_full_fuel 100 "show 100% of the status bar at this a
 seta hud_panel_weapons_timeout "3" "panel disappears if you don't switch weapon for this amount of seconds"
 seta hud_panel_weapons_timeout_effect "1" "disappearance effect: 0) no effect; 1) panel moves out of screen; 2) panel fades out"
 
+seta hud_panel_ammo_maxammo "40" "when you have this much ammo, the ammo status bar is full"
+
 seta hud_panel_healtharmor_maxhealth "250" "when you have this much health, the health status bar is full"
 seta hud_panel_healtharmor_maxarmor "150" "when you have this much armor, the armor status bar is full"
 
diff --git a/gfx/hud/luminos_xhair/ammo_bullets.tga b/gfx/hud/luminos_xhair/ammo_bullets.tga
new file mode 100644 (file)
index 0000000..8e2783c
Binary files /dev/null and b/gfx/hud/luminos_xhair/ammo_bullets.tga differ
diff --git a/gfx/hud/luminos_xhair/ammo_cells.tga b/gfx/hud/luminos_xhair/ammo_cells.tga
new file mode 100644 (file)
index 0000000..3735acd
Binary files /dev/null and b/gfx/hud/luminos_xhair/ammo_cells.tga differ
diff --git a/gfx/hud/luminos_xhair/ammo_current_bg.tga b/gfx/hud/luminos_xhair/ammo_current_bg.tga
new file mode 100644 (file)
index 0000000..8b41e0f
Binary files /dev/null and b/gfx/hud/luminos_xhair/ammo_current_bg.tga differ
diff --git a/gfx/hud/luminos_xhair/ammo_rockets.tga b/gfx/hud/luminos_xhair/ammo_rockets.tga
new file mode 100644 (file)
index 0000000..de61d5a
Binary files /dev/null and b/gfx/hud/luminos_xhair/ammo_rockets.tga differ
diff --git a/gfx/hud/luminos_xhair/ammo_shells.tga b/gfx/hud/luminos_xhair/ammo_shells.tga
new file mode 100644 (file)
index 0000000..fd70b43
Binary files /dev/null and b/gfx/hud/luminos_xhair/ammo_shells.tga differ
diff --git a/gfx/hud/luminos_xhair/border_healtharmor.tga b/gfx/hud/luminos_xhair/border_healtharmor.tga
new file mode 100644 (file)
index 0000000..ab30e14
Binary files /dev/null and b/gfx/hud/luminos_xhair/border_healtharmor.tga differ
diff --git a/gfx/hud/luminos_xhair/progressbar_ammo.tga b/gfx/hud/luminos_xhair/progressbar_ammo.tga
new file mode 100644 (file)
index 0000000..9db210f
Binary files /dev/null and b/gfx/hud/luminos_xhair/progressbar_ammo.tga differ
diff --git a/gfx/hud/luminos_xhair/progressbar_armor_vertical.tga b/gfx/hud/luminos_xhair/progressbar_armor_vertical.tga
new file mode 100644 (file)
index 0000000..0eb2972
Binary files /dev/null and b/gfx/hud/luminos_xhair/progressbar_armor_vertical.tga differ
diff --git a/gfx/hud/luminos_xhair/progressbar_health_vertical.tga b/gfx/hud/luminos_xhair/progressbar_health_vertical.tga
new file mode 100644 (file)
index 0000000..1bfe49b
Binary files /dev/null and b/gfx/hud/luminos_xhair/progressbar_health_vertical.tga differ
index 7fb827be4f00d9be017ee05e9dcb34b94db80930..8a946578f79e0e17351556bdef69de5169c7e8c3 100644 (file)
@@ -57,6 +57,10 @@ seta hud_panel_ammo_bg_border ""
 seta hud_panel_ammo_bg_padding ""
 seta hud_panel_ammo_onlycurrent "0"
 seta hud_panel_ammo_iconalign "0"
+seta hud_panel_ammo_progressbar "0"
+seta hud_panel_ammo_progressbar_xoffset "0"
+seta hud_panel_ammo_progressbar_name "progressbar"
+seta hud_panel_ammo_text "1"
 
 seta hud_panel_powerups 1
 seta hud_panel_powerups_pos "0.660000 0.940000"
index 6ccbd2b4bc4ce370b3e50a5425b8a7b6c0143e1d..8ee4ea7780133da438d856aa9c205b4048a2e4e1 100644 (file)
@@ -57,6 +57,10 @@ seta hud_panel_ammo_bg_border ""
 seta hud_panel_ammo_bg_padding ""
 seta hud_panel_ammo_onlycurrent "0"
 seta hud_panel_ammo_iconalign "0"
+seta hud_panel_ammo_progressbar "0"
+seta hud_panel_ammo_progressbar_xoffset "0"
+seta hud_panel_ammo_progressbar_name "progressbar"
+seta hud_panel_ammo_text "1"
 
 seta hud_panel_powerups 1
 seta hud_panel_powerups_pos "0.290000 0.890000"
diff --git a/hud_luminos_xhair_minimal.cfg b/hud_luminos_xhair_minimal.cfg
new file mode 100644 (file)
index 0000000..ba9e01a
--- /dev/null
@@ -0,0 +1,213 @@
+seta hud_skin "luminos_xhair"
+seta hud_panel_bg "0"
+seta hud_panel_bg_color "1 0.4375 0"
+seta hud_panel_bg_color_team "0"
+seta hud_panel_bg_alpha "1"
+seta hud_panel_bg_border "8"
+seta hud_panel_bg_padding "2"
+seta hud_panel_fg_alpha "1"
+
+seta hud_dock "0"
+seta hud_dock_color "0 0.449576 0.860796"
+seta hud_dock_color_team "0.700000"
+seta hud_dock_alpha "1"
+
+seta hud_progressbar_alpha "0.3"
+seta hud_progressbar_strength_color "0 0 0.6"
+seta hud_progressbar_shield_color "0.6 0 0.6"
+seta hud_progressbar_health_color "0.6 0 0"
+seta hud_progressbar_armor_color "0 0.6 0"
+seta hud_progressbar_fuel_color "0.6 0.6 0"
+seta hud_progressbar_nexball_color "0.7 0.1 0"
+
+seta _hud_panelorder "3 1 2 11 10 0 14 6 9 13 4 12 7 5 8 "
+
+seta hud_configure_grid "1"
+seta hud_configure_grid_xsize "0.010000"
+seta hud_configure_grid_ysize "0.010000"
+
+seta scr_centerpos "0.25"
+
+seta hud_panel_weapons 1
+seta hud_panel_weapons_pos "0.350000 0.940000"
+seta hud_panel_weapons_size "0.300000 0.060000"
+seta hud_panel_weapons_bg ""
+seta hud_panel_weapons_bg_color ""
+seta hud_panel_weapons_bg_color_team ""
+seta hud_panel_weapons_bg_alpha ""
+seta hud_panel_weapons_bg_border ""
+seta hud_panel_weapons_bg_padding ""
+seta hud_panel_weapons_complainbubble "1"
+seta hud_panel_weapons_complainbubble_padding "-10"
+seta hud_panel_weapons_complainbubble_color_outofammo "0.8 0 0"
+seta hud_panel_weapons_complainbubble_color_donthave "0.8 0.5 0"
+seta hud_panel_weapons_complainbubble_color_unavailable "0 0.3 0.8"
+seta hud_panel_weapons_ammo_color "0 1 0"
+seta hud_panel_weapons_ammo_alpha "1"
+seta hud_panel_weapons_aspect "2"
+
+seta hud_panel_ammo 1
+seta hud_panel_ammo_pos "0.450000 0.630000"
+seta hud_panel_ammo_size "0.080000 0.040000"
+seta hud_panel_ammo_bg ""
+seta hud_panel_ammo_bg_color ""
+seta hud_panel_ammo_bg_color_team ""
+seta hud_panel_ammo_bg_alpha ""
+seta hud_panel_ammo_bg_border ""
+seta hud_panel_ammo_bg_padding ""
+seta hud_panel_ammo_onlycurrent "1"
+seta hud_panel_ammo_iconalign "0"
+seta hud_panel_ammo_progressbar "1"
+seta hud_panel_ammo_progressbar_name "progressbar_ammo"
+seta hud_panel_ammo_text "1"
+
+seta hud_panel_powerups 1
+seta hud_panel_powerups_pos "0.270000 0.940000"
+seta hud_panel_powerups_size "0.080000 0.060000"
+seta hud_panel_powerups_bg "0"
+seta hud_panel_powerups_bg_color ""
+seta hud_panel_powerups_bg_color_team ""
+seta hud_panel_powerups_bg_alpha ""
+seta hud_panel_powerups_bg_border ""
+seta hud_panel_powerups_bg_padding "-3"
+seta hud_panel_powerups_flip "1"
+seta hud_panel_powerups_iconalign "1"
+seta hud_panel_powerups_baralign "1"
+seta hud_panel_powerups_progressbar "1"
+seta hud_panel_powerups_progressbar_strength "progressbar"
+seta hud_panel_powerups_progressbar_shield "progressbar"
+
+seta hud_panel_healtharmor 1
+seta hud_panel_healtharmor_pos "0.350000 0.380000"
+seta hud_panel_healtharmor_size "0.070000 0.240000"
+seta hud_panel_healtharmor_bg "border_healtharmor"
+seta hud_panel_healtharmor_bg_color "0.464391 0.464391 0.464391"
+seta hud_panel_healtharmor_bg_color_team ""
+seta hud_panel_healtharmor_bg_alpha "0.600000"
+seta hud_panel_healtharmor_bg_border "-1"
+seta hud_panel_healtharmor_bg_padding "0"
+seta hud_panel_healtharmor_flip "0"
+seta hud_panel_healtharmor_iconalign "1"
+seta hud_panel_healtharmor_baralign "1"
+seta hud_panel_healtharmor_progressbar "1"
+seta hud_panel_healtharmor_progressbar_health "progressbar_health"
+seta hud_panel_healtharmor_progressbar_armor "progressbar_armor"
+seta hud_panel_healtharmor_text "0"
+
+seta hud_panel_notify 1
+seta hud_panel_notify_pos "0 0"
+seta hud_panel_notify_size "0.210000 0.260000"
+seta hud_panel_notify_bg "0"
+seta hud_panel_notify_bg_color ""
+seta hud_panel_notify_bg_color_team ""
+seta hud_panel_notify_bg_alpha ""
+seta hud_panel_notify_bg_border ""
+seta hud_panel_notify_bg_padding ""
+seta hud_panel_notify_flip "1"
+seta hud_panel_notify_print "0"
+
+seta hud_panel_timer 1
+seta hud_panel_timer_pos "0.435000 0"
+seta hud_panel_timer_size "0.135000 0.060000"
+seta hud_panel_timer_bg "0"
+seta hud_panel_timer_bg_color ""
+seta hud_panel_timer_bg_color_team ""
+seta hud_panel_timer_bg_alpha ""
+seta hud_panel_timer_bg_border ""
+seta hud_panel_timer_bg_padding "0"
+
+seta hud_panel_radar 2
+seta hud_panel_radar_pos "0.810000 0"
+seta hud_panel_radar_size "0.190000 0.250000"
+seta hud_panel_radar_bg "border_radar"
+seta hud_panel_radar_bg_color ""
+seta hud_panel_radar_bg_color_team ""
+seta hud_panel_radar_bg_alpha "0.500000"
+seta hud_panel_radar_bg_border "0"
+seta hud_panel_radar_bg_padding "0"
+seta hud_panel_radar_foreground_alpha "0.500000"
+
+seta hud_panel_score 1
+seta hud_panel_score_pos "0.465000 0.045000"
+seta hud_panel_score_size "0.090000 0.060000"
+seta hud_panel_score_bg ""
+seta hud_panel_score_bg_color ""
+seta hud_panel_score_bg_color_team ""
+seta hud_panel_score_bg_alpha ""
+seta hud_panel_score_bg_border ""
+seta hud_panel_score_bg_padding ""
+
+seta hud_panel_racetimer 1
+seta hud_panel_racetimer_pos "0.360000 0.090000"
+seta hud_panel_racetimer_size "0.280000 0.090000"
+seta hud_panel_racetimer_bg "0"
+seta hud_panel_racetimer_bg_color ""
+seta hud_panel_racetimer_bg_color_team ""
+seta hud_panel_racetimer_bg_alpha ""
+seta hud_panel_racetimer_bg_border ""
+seta hud_panel_racetimer_bg_padding ""
+
+seta hud_panel_vote 1
+seta hud_panel_vote_pos "0 0.890000"
+seta hud_panel_vote_size "0.170000 0.110000"
+seta hud_panel_vote_bg ""
+seta hud_panel_vote_bg_color ""
+seta hud_panel_vote_bg_color_team ""
+seta hud_panel_vote_bg_alpha ""
+seta hud_panel_vote_bg_border ""
+seta hud_panel_vote_bg_padding ""
+seta hud_panel_vote_alreadyvoted_alpha "0.800000"
+
+seta hud_panel_modicons 1
+seta hud_panel_modicons_pos "0.560000 0"
+seta hud_panel_modicons_size "0.050000 0.100000"
+seta hud_panel_modicons_bg ""
+seta hud_panel_modicons_bg_color ""
+seta hud_panel_modicons_bg_color_team ""
+seta hud_panel_modicons_bg_alpha ""
+seta hud_panel_modicons_bg_border ""
+seta hud_panel_modicons_bg_padding ""
+
+seta hud_panel_pressedkeys 1
+seta hud_panel_pressedkeys_pos "0.450000 0.690000"
+seta hud_panel_pressedkeys_size "0.100000 0.110000"
+seta hud_panel_pressedkeys_bg "0"
+seta hud_panel_pressedkeys_bg_color ""
+seta hud_panel_pressedkeys_bg_color_team ""
+seta hud_panel_pressedkeys_bg_alpha ""
+seta hud_panel_pressedkeys_bg_border ""
+seta hud_panel_pressedkeys_bg_padding ""
+seta hud_panel_pressedkeys_aspect "1.600000"
+
+seta hud_panel_chat 1
+seta hud_panel_chat_pos "0 0.775000"
+seta hud_panel_chat_size "0.460000 0.110000"
+seta hud_panel_chat_bg "0"
+seta hud_panel_chat_bg_color ""
+seta hud_panel_chat_bg_color_team ""
+seta hud_panel_chat_bg_alpha ""
+seta hud_panel_chat_bg_border ""
+seta hud_panel_chat_bg_padding ""
+
+seta hud_panel_engineinfo 0
+seta hud_panel_engineinfo_pos "0.910000 0.970000"
+seta hud_panel_engineinfo_size "0.090000 0.030000"
+seta hud_panel_engineinfo_bg "0"
+seta hud_panel_engineinfo_bg_color ""
+seta hud_panel_engineinfo_bg_color_team ""
+seta hud_panel_engineinfo_bg_alpha ""
+seta hud_panel_engineinfo_bg_border ""
+seta hud_panel_engineinfo_bg_padding ""
+
+seta hud_panel_infomessages 1
+seta hud_panel_infomessages_pos "0.710000 0"
+seta hud_panel_infomessages_size "0.290000 0.100000"
+seta hud_panel_infomessages_bg "0"
+seta hud_panel_infomessages_bg_color ""
+seta hud_panel_infomessages_bg_color_team ""
+seta hud_panel_infomessages_bg_alpha ""
+seta hud_panel_infomessages_bg_border ""
+seta hud_panel_infomessages_bg_padding "0"
+seta hud_panel_infomessages_flip "1"
+
+menu_sync
index bdd7a97f2ab3c978b9a7d07eb7ede6d6e9b3d964..dfecf74009385704191e561a0f00e1c87407aa76 100644 (file)
@@ -57,6 +57,10 @@ seta hud_panel_ammo_bg_border ""
 seta hud_panel_ammo_bg_padding ""
 seta hud_panel_ammo_onlycurrent "0"
 seta hud_panel_ammo_iconalign "0"
+seta hud_panel_ammo_progressbar "0"
+seta hud_panel_ammo_progressbar_xoffset "0"
+seta hud_panel_ammo_progressbar_name "progressbar"
+seta hud_panel_ammo_text "1"
 
 seta hud_panel_powerups 1
 seta hud_panel_powerups_pos "0.660000 0.910000"
@@ -71,6 +75,9 @@ seta hud_panel_powerups_flip "1"
 seta hud_panel_powerups_iconalign "0"
 seta hud_panel_powerups_baralign "0"
 seta hud_panel_powerups_progressbar "0"
+seta hud_panel_powerups_progressbar_strength "progressbar"
+seta hud_panel_powerups_progressbar_shield "progressbar"
+seta hud_panel_powerups_text "1"
 
 seta hud_panel_healtharmor 1
 seta hud_panel_healtharmor_pos "0.370000 0.930000"
@@ -85,6 +92,9 @@ seta hud_panel_healtharmor_flip "0"
 seta hud_panel_healtharmor_iconalign "0"
 seta hud_panel_healtharmor_baralign "0"
 seta hud_panel_healtharmor_progressbar "0"
+seta hud_panel_healtharmor_progressbar_health "progressbar"
+seta hud_panel_healtharmor_progressbar_armor "progressbar"
+seta hud_panel_healtharmor_text "1"
 
 seta hud_panel_notify 0
 seta hud_panel_notify_pos "0 0.650000"
index 9905ef3993b54927e608a9415e2b577eec635d35..7ad148b0cb516edbfe844c2a34b8498bacf7950f 100644 (file)
@@ -496,6 +496,9 @@ void HUD_Panel_ExportCfg(string cfgname)
                                case HUD_PANEL_AMMO:
                                        HUD_Write_PanelCvar_q("_onlycurrent");
                                        HUD_Write_PanelCvar_q("_iconalign");
+                                       HUD_Write_PanelCvar_q("_progressbar");
+                                       HUD_Write_PanelCvar_q("_progressbar_name");
+                                       HUD_Write_PanelCvar_q("_text");
                                        break;
                                case HUD_PANEL_POWERUPS:
                                        HUD_Write_PanelCvar_q("_flip");
@@ -1912,10 +1915,16 @@ void DrawAmmoItem(vector myPos, vector mySize, float itemcode, float currently_s
        if (currently_selected)
                drawpic_aspect_skin(myPos, "ammo_current_bg", mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 
-       if(a > 0)
-               drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize_x + eY * mySize_y, color, panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
-       else // "ghost" ammo count
-               drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize_x + eY * mySize_y, '0 0 0', panel_fg_alpha * alpha * 0.5, DRAWFLAG_NORMAL);
+    if(a > 0 && cvar("hud_panel_ammo_progressbar"))
+        HUD_Panel_DrawProgressBar(myPos + eX * cvar("hud_panel_ammo_progressbar_xoffset") * mySize_x, mySize - eX * cvar("hud_panel_ammo_progressbar_xoffset") * mySize_x, cvar_string("hud_panel_ammo_progressbar_name"), 0, 0, min(1, a/cvar("hud_panel_ammo_maxammo")), color, autocvar_hud_progressbar_alpha * panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
+
+    if(cvar("hud_panel_ammo_text"))
+    {
+        if(a > 0)
+            drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize_x + eY * mySize_y, color, panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
+        else // "ghost" ammo count
+            drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize_x + eY * mySize_y, '0 0 0', panel_fg_alpha * alpha * 0.5, DRAWFLAG_NORMAL);
+    }
        if(a > 0)
                drawpic_aspect_skin(picpos, GetAmmoPicture(itemcode), '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
        else // "ghost" ammo icon