mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add 'select' element (WIP)
This commit is contained in:
parent
f473df33fb
commit
3571d0c902
4 changed files with 91 additions and 3 deletions
16
src/graphics/ui/elements/SelectBox.cpp
Normal file
16
src/graphics/ui/elements/SelectBox.cpp
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#include "SelectBox.hpp"
|
||||
|
||||
#include "Label.hpp"
|
||||
|
||||
using namespace gui;
|
||||
|
||||
SelectBox::SelectBox(
|
||||
GUI& gui,
|
||||
std::vector<Element>&& elements,
|
||||
Element selected,
|
||||
int contentWidth,
|
||||
const glm::vec4& padding
|
||||
)
|
||||
: Button(gui, selected.text, padding, nullptr, glm::vec2(contentWidth, -1)),
|
||||
elements(std::move(elements)) {
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue