projects
/
xonotic
/
xonotic-data.pk3dir.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
130a0b7
)
hey, fix the vote window coloring and add more useless TODO comments :)
author
FruitieX <rasse@rasse-lappy.localdomain>
Sun, 23 May 2010 19:56:09 +0000
(22:56 +0300)
committer
FruitieX <rasse@rasse-lappy.localdomain>
Sun, 23 May 2010 19:56:09 +0000
(22:56 +0300)
qcsrc/client/hud.qc
patch
|
blob
|
history
diff --git
a/qcsrc/client/hud.qc
b/qcsrc/client/hud.qc
index
eb8103d
..
3b0f959
100644
(file)
--- a/
qcsrc/client/hud.qc
+++ b/
qcsrc/client/hud.qc
@@
-718,6
+718,7
@@
float HUD_Panel_GetBorder(float id)
vector HUD_Panel_GetColor(float id)
{
vector HUD_Panel_GetColor(float id)
{
+ // TODO: idea: let user choose colors "pants", "shirt"
string color;
color = cvar_string(strcat("hud_", HUD_Panel_GetName(id), "_bg_color"));
if(color == "")
string color;
color = cvar_string(strcat("hud_", HUD_Panel_GetName(id), "_bg_color"));
if(color == "")
@@
-2563,11
+2564,11
@@
void HUD_VoteWindow(void)
if(vote_alpha) {
a = vote_alpha * bound(cvar_or("hud_vote_alreadyvoted_alpha", 0.75), 1 - vote_highlighted, 1);
if(vote_alpha) {
a = vote_alpha * bound(cvar_or("hud_vote_alreadyvoted_alpha", 0.75), 1 - vote_highlighted, 1);
- drawpic_skin(pos, "voteprogress_back", mySize, HUD_
GetBgColor(
), a * hud_alpha_bg, DRAWFLAG_NORMAL);
+ drawpic_skin(pos, "voteprogress_back", mySize, HUD_
Panel_GetColor(id
), a * hud_alpha_bg, DRAWFLAG_NORMAL);
s = "A vote has been called for: ";
drawstring(pos + '0.5 0 0' * mySize_x + '0 0.1 0' * mySize_y - eX * stringwidth(s, FALSE, '1 1 0' * 0.5 * mySize_y*(1/5)), s, '1 1 0' * mySize_y*(1/5), '1 1 1', a * hud_alpha_fg, DRAWFLAG_NORMAL);
s = "A vote has been called for: ";
drawstring(pos + '0.5 0 0' * mySize_x + '0 0.1 0' * mySize_y - eX * stringwidth(s, FALSE, '1 1 0' * 0.5 * mySize_y*(1/5)), s, '1 1 0' * mySize_y*(1/5), '1 1 1', a * hud_alpha_fg, DRAWFLAG_NORMAL);
- s = textShortenToWidth(vote_called_vote, mySize_x * 0.96, '10 0 0', stringwidth_colors);
+ s = textShortenToWidth(vote_called_vote, mySize_x * 0.96, '10 0 0', stringwidth_colors);
// TODO: broken?
if(hud_configure)
s = "Configure the HUD";
drawcolorcodedstring(pos + '0.52 0 0' * mySize_x + '0 0.3 0' * mySize_y - eX * stringwidth(s, FALSE, '1 1 0' * 0.5 * mySize_y*(1/6)), s, '1 1 0' * mySize_y*(1/6), a * hud_alpha_fg, DRAWFLAG_NORMAL);
if(hud_configure)
s = "Configure the HUD";
drawcolorcodedstring(pos + '0.52 0 0' * mySize_x + '0 0.3 0' * mySize_y - eX * stringwidth(s, FALSE, '1 1 0' * 0.5 * mySize_y*(1/6)), s, '1 1 0' * mySize_y*(1/6), a * hud_alpha_fg, DRAWFLAG_NORMAL);