mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
clang warnings fix
This commit is contained in:
parent
4a22e8d57b
commit
f25677d6d2
20 changed files with 37 additions and 45 deletions
|
|
@ -89,6 +89,7 @@ Button::Button(std::shared_ptr<UINode> content, glm::vec4 padding)
|
|||
padding[1]+padding[3]+margin[1]+margin[3]));
|
||||
add(content);
|
||||
scrollable(false);
|
||||
setHoverColor(glm::vec4(0.05f, 0.1f, 0.15f, 0.75f));
|
||||
}
|
||||
|
||||
Button::Button(std::wstring text, glm::vec4 padding, onaction action)
|
||||
|
|
@ -102,6 +103,7 @@ Button::Button(std::wstring text, glm::vec4 padding, onaction action)
|
|||
label = std::make_shared<Label>(text);
|
||||
label->setAlign(Align::center);
|
||||
add(label);
|
||||
setHoverColor(glm::vec4(0.05f, 0.1f, 0.15f, 0.75f));
|
||||
}
|
||||
|
||||
void Button::setText(std::wstring text) {
|
||||
|
|
@ -124,10 +126,6 @@ Button* Button::textSupplier(wstringsupplier supplier) {
|
|||
return this;
|
||||
}
|
||||
|
||||
void Button::setHoverColor(glm::vec4 color) {
|
||||
hoverColor = color;
|
||||
}
|
||||
|
||||
void Button::drawBackground(const GfxContext* pctx, Assets* assets) {
|
||||
vec2 coord = calcCoord();
|
||||
auto batch = pctx->getBatch2D();
|
||||
|
|
@ -163,6 +161,7 @@ void Button::textAlign(Align align) {
|
|||
|
||||
// ============================== RichButton ==================================
|
||||
RichButton::RichButton(vec2 size) : Container(vec2(), size) {
|
||||
setHoverColor(glm::vec4(0.05f, 0.1f, 0.15f, 0.75f));
|
||||
}
|
||||
|
||||
void RichButton::mouseRelease(GUI* gui, int x, int y) {
|
||||
|
|
@ -179,10 +178,6 @@ RichButton* RichButton::listenAction(onaction action) {
|
|||
return this;
|
||||
}
|
||||
|
||||
void RichButton::setHoverColor(glm::vec4 color) {
|
||||
hoverColor = color;
|
||||
}
|
||||
|
||||
void RichButton::drawBackground(const GfxContext* pctx, Assets* assets) {
|
||||
vec2 coord = calcCoord();
|
||||
auto batch = pctx->getBatch2D();
|
||||
|
|
@ -198,6 +193,7 @@ TextBox::TextBox(std::wstring placeholder, vec4 padding)
|
|||
placeholder(placeholder) {
|
||||
label = std::make_shared<Label>(L"");
|
||||
add(label);
|
||||
setHoverColor(glm::vec4(0.05f, 0.1f, 0.2f, 0.75f));
|
||||
}
|
||||
|
||||
void TextBox::drawBackground(const GfxContext* pctx, Assets* assets) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue