mirror of
https://github.com/zhenyan121/SporeBG-Conid.git
synced 2026-04-10 06:14:08 +08:00
Added UI class and UI rendering class
This commit is contained in:
33
src/ui/components/Button.cpp
Normal file
33
src/ui/components/Button.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#include "Button.h"
|
||||
|
||||
Button::Button()
|
||||
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Button::setText(const std::string& text, TextStyle style) {
|
||||
m_buttonData.text = text;
|
||||
m_buttonData.textstytle = style;
|
||||
}
|
||||
|
||||
void Button::setBackgroundColor(SDL_Color normal) {
|
||||
m_buttonData.backgroundColor = normal;
|
||||
}
|
||||
|
||||
void Button::setBorder(int thickness, SDL_Color color) {
|
||||
m_buttonData.borderThickness = thickness;
|
||||
m_buttonData.borderColor = color;
|
||||
}
|
||||
|
||||
|
||||
void Button::update(float deltaTime) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user