about summary refs log tree commit diff
path: root/src/game/client/components/voting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/client/components/voting.cpp')
-rw-r--r--src/game/client/components/voting.cpp24
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);
 		}
 	}	
 }