mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
Button constructor update
This commit is contained in:
parent
1ba563d42a
commit
4d6e4c8b87
4 changed files with 42 additions and 49 deletions
|
|
@ -91,10 +91,12 @@ Button::Button(std::shared_ptr<UINode> content, glm::vec4 padding)
|
|||
scrollable(false);
|
||||
}
|
||||
|
||||
Button::Button(std::wstring text, glm::vec4 padding, glm::vec4 margin)
|
||||
Button::Button(std::wstring text, glm::vec4 padding, onaction action)
|
||||
: Panel(vec2(32,32), padding, 0)
|
||||
{
|
||||
setMargin(margin);
|
||||
if (action) {
|
||||
listenAction(action);
|
||||
}
|
||||
scrollable(false);
|
||||
|
||||
label = std::make_shared<Label>(text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue