From 82306827bd8c8b7b0a667df48bd95f5c2948c690 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 7 Sep 2012 04:04:24 +0200 Subject: menu: use RgbColor.get_array(?) magic everywhere --- src/menu/software_mouse_pointer.cpp | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'src/menu/software_mouse_pointer.cpp') diff --git a/src/menu/software_mouse_pointer.cpp b/src/menu/software_mouse_pointer.cpp index 8e42cc25..e9b3b603 100644 --- a/src/menu/software_mouse_pointer.cpp +++ b/src/menu/software_mouse_pointer.cpp @@ -29,7 +29,7 @@ namespace usdx { SoftwareMousePointer::SoftwareMousePointer(Container* parent, EventManager* event_manager) - : DrawableControl(parent) + : DrawableControl(parent), color(255,255,255,100) { fade_inactive = new Timer(this, 2000, true); @@ -42,23 +42,6 @@ namespace usdx this->vertices[6] = 0.0f; this->vertices[7] = 0.0f; - this->color[0] = 255; - this->color[1] = 255; - this->color[2] = 255; - this->color[3] = 100; - this->color[4] = 255; - this->color[5] = 255; - this->color[6] = 255; - this->color[7] = 100; - this->color[8] = 255; - this->color[9] = 255; - this->color[10] = 255; - this->color[11] = 100; - this->color[12] = 255; - this->color[13] = 255; - this->color[14] = 255; - this->color[15] = 100; - this->texture[0] = 0.0f; this->texture[1] = 1.0f; this->texture[2] = 1.0f; @@ -108,7 +91,7 @@ namespace usdx glEnableClientState(GL_COLOR_ARRAY); glVertexPointer(2, GL_FLOAT, 0, vertices); - glColorPointer(4, GL_UNSIGNED_BYTE, 0, color); + glColorPointer(4, GL_UNSIGNED_BYTE, 0, color.get_array(4)); glTexCoordPointer(2, GL_FLOAT, 0, texture); glEnable(GL_BLEND); -- cgit v1.2.3