mirror of
https://github.com/edubart/otclient.git
synced 2025-12-24 00:47:10 +01:00
ui skinning
This commit is contained in:
@@ -26,25 +26,9 @@
|
||||
#include "../fonts.h"
|
||||
#include "../font.h"
|
||||
|
||||
UIButton::UIButton(const std::string& text) :
|
||||
m_text(text),
|
||||
m_state(UI::ButtonUp)
|
||||
{
|
||||
m_imageButtonUp = ImagePtr(new BorderedImage("ui.png",
|
||||
Rect(45,139,1,18),
|
||||
Rect(130,139,1,18),
|
||||
Rect(46,138,84,1),
|
||||
Rect(46,157,84,1),
|
||||
Rect(45,138,1,1),
|
||||
Rect(130,138,1,1),
|
||||
Rect(45,157,1,1),
|
||||
Rect(130,157,1,1),
|
||||
Rect(46,139,84,18)));
|
||||
}
|
||||
|
||||
void UIButton::render()
|
||||
{
|
||||
m_imageButtonUp->draw(m_rect);
|
||||
UIElement::render();
|
||||
|
||||
g_fonts.get("tibia-8px-antialised")->renderText(m_text, m_rect, ALIGN_CENTER);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user