void cWindowManager::_RenderButton(const cWidget_Button& widget) const { SetColourFromThemeColourAndAlpha(theme.GetColourControlPrimary()); _RenderRectangle(widget.GetX(), widget.GetY(), widget.GetWidth(), widget.GetHeight()); /*pContext->RenderScreenSpaceRectangleTopLeftIsAt( widget.HorizontalRelativeToAbsolute(widget.GetXAbsolute()), widget.VerticalRelativeToAbsolute(widget.GetYAbsolute()), absolute_width, absolute_height, 0.0083f, 0.073f, 0.08f, 0.045f);//CreateTextureCoord(absolute_width), CreateTextureCoord(absolute_height)); */ /*// Draw the text of this widget glPushAttrib(GL_LIST_BIT | GL_CURRENT_BIT | GL_ENABLE_BIT); pContext->UnApplyMaterial(pMaterial); pContext->SelectTextureUnit0(); glMatrixMode(GL_TEXTURE); glPushMatrix(); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glColor4f(0.0f, 0.0f, 0.0f, 1.0f); pFontWindowCaption->PrintCenteredHorizontallyVertically( widget.GetX(), widget.GetY(), widget.GetWidth(), widget.GetHeight(), widget.GetText() ); glMatrixMode(GL_TEXTURE); glPopMatrix(); pContext->ApplyMaterial(pMaterial); glPopAttrib(); pContext->ClearMaterial();*/ }
void cWindowManager::_RenderStaticText(const cWidget_StaticText& widget) const { SetColourFromThemeColourAndAlpha(theme.GetColourControlPrimary()); _RenderRectangle(widget.GetX(), widget.GetY(), widget.GetWidth(), widget.GetHeight()); /*render::cFont* pFont = widget.GetFont(); if (pFont == nullptr) pFont = pFontWindowCaption; pContext->BeginRenderingText(); breathe::constant_stack<std::string>::reverse_iterator iter = CONSOLE.rbegin(); breathe::constant_stack<std::string>::reverse_iterator iterEnd = CONSOLE.rend(); unsigned int y = 60; while(iter != iterEnd) { pContext->SetColour(widget.GetColour()); pFont->printf(0, static_cast<float>(y), (*iter).c_str()); y += 30; iter++; }; pContext->EndRenderingText(); pContext->ClearMaterial();*/ }
void cWindowManager::_RenderInput(const cWidget_Input& widget) const { SetColourFromThemeColourAndAlpha(theme.GetColourControlPrimary()); _RenderRectangle(widget.GetX(), widget.GetY(), widget.GetWidth(), widget.GetHeight()); }