Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CSlider::Draw(bool hover)
- {
- POINT a = GetAbsolutePos();
- Render::Clear(a.x, a.y + 3, m_iWidth, 6, Color(1, 1, 1, 255));
- Render::Clear(a.x+1, a.y + 4, m_iWidth-2, 4, Color(105, 105, 105, 255));
- Render::Clear(a.x+2, a.y + 5, m_iWidth-4, 2, Color(68, 68, 68, 255));
- float Ratio = Value / (Max - Min);
- float Location = Ratio*m_iWidth;
- Render::Clear(a.x + 2, a.y + 5, a.x + 2 + Location, 2, Color(60, 160, 0, 255));
- //Render::Outline(a.x + Location, a.y + 1, 4, 9, Color(20, 20, 20, 80));
- char buffer[24];
- sprintf_s(buffer, "%.2f", Value);
- RECT txtSize = Render::GetTextSize(Render::Fonts::MenuBold, buffer);
- Render::Text(a.x + (m_iWidth / 2) - txtSize.right, a.y, Color(255, 255, 255, 255), Render::Fonts::MenuBold, buffer);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement