diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2009-10-27 14:38:53 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2009-10-27 14:38:53 +0000 |
| commit | 878ede3080ab2cfb627aca505c397d9765052996 (patch) | |
| tree | 98bff371070e1dca0295f0ca58d64ac4ee8042ce /src/game/client/components/voting.cpp | |
| parent | 9b99ec0e60b60134e46f2f71d707230948f7db03 (diff) | |
| download | zcatch-878ede3080ab2cfb627aca505c397d9765052996.tar.gz zcatch-878ede3080ab2cfb627aca505c397d9765052996.zip | |
major update with stuff
Diffstat (limited to 'src/game/client/components/voting.cpp')
| -rw-r--r-- | src/game/client/components/voting.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/game/client/components/voting.cpp b/src/game/client/components/voting.cpp index 190ba224..dcf5c954 100644 --- a/src/game/client/components/voting.cpp +++ b/src/game/client/components/voting.cpp @@ -143,30 +143,30 @@ void VOTING::on_render() } -void VOTING::render_bars(RECT bars, bool text) +void VOTING::render_bars(CUIRect bars, bool text) { - ui_draw_rect(&bars, vec4(0.8f,0.8f,0.8f,0.5f), CORNER_ALL, bars.h/3); + RenderTools()->DrawUIRect(&bars, vec4(0.8f,0.8f,0.8f,0.5f), CUI::CORNER_ALL, bars.h/3); - RECT splitter = bars; + CUIRect splitter = bars; splitter.x = splitter.x+splitter.w/2; splitter.w = splitter.h/2.0f; splitter.x -= splitter.w/2; - ui_draw_rect(&splitter, vec4(0.4f,0.4f,0.4f,0.5f), CORNER_ALL, splitter.h/4); + RenderTools()->DrawUIRect(&splitter, vec4(0.4f,0.4f,0.4f,0.5f), CUI::CORNER_ALL, splitter.h/4); if(total) { - RECT pass_area = bars; + CUIRect pass_area = bars; if(yes) { - RECT yes_area = bars; + CUIRect yes_area = bars; yes_area.w *= yes/(float)total; - ui_draw_rect(&yes_area, vec4(0.2f,0.9f,0.2f,0.85f), CORNER_ALL, bars.h/3); + RenderTools()->DrawUIRect(&yes_area, vec4(0.2f,0.9f,0.2f,0.85f), CUI::CORNER_ALL, bars.h/3); if(text) { char buf[256]; str_format(buf, sizeof(buf), "%d", yes); - ui_do_label(&yes_area, buf, bars.h*0.75f, 0); + UI()->DoLabel(&yes_area, buf, bars.h*0.75f, 0); } pass_area.x += yes_area.w; @@ -175,16 +175,16 @@ void VOTING::render_bars(RECT bars, bool text) if(no) { - RECT no_area = bars; + CUIRect no_area = bars; no_area.w *= no/(float)total; no_area.x = (bars.x + bars.w)-no_area.w; - ui_draw_rect(&no_area, vec4(0.9f,0.2f,0.2f,0.85f), CORNER_ALL, bars.h/3); + RenderTools()->DrawUIRect(&no_area, vec4(0.9f,0.2f,0.2f,0.85f), CUI::CORNER_ALL, bars.h/3); if(text) { char buf[256]; str_format(buf, sizeof(buf), "%d", no); - ui_do_label(&no_area, buf, bars.h*0.75f, 0); + UI()->DoLabel(&no_area, buf, bars.h*0.75f, 0); } pass_area.w -= no_area.w; @@ -194,7 +194,7 @@ void VOTING::render_bars(RECT bars, bool text) { char buf[256]; str_format(buf, sizeof(buf), "%d", pass); - ui_do_label(&pass_area, buf, bars.h*0.75f, 0); + UI()->DoLabel(&pass_area, buf, bars.h*0.75f, 0); } } } |