Merge branch 'main' into main

This commit is contained in:
Onran 2024-02-21 22:41:44 +09:00 • committed by GitHub
commit 12e6a92798
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 191 additions and 116 deletions

View file

@ -361,10 +361,18 @@ std::wstring TextBox::getText() const {
return input;
}
void TextBox::setText(std::wstring value) {
void TextBox::setText(const std::wstring value) {
this->input = value;
}
std::wstring TextBox::getPlaceholder() const {
return placeholder;
}
void TextBox::setPlaceholder(const std::wstring& placeholder) {
this->placeholder = placeholder;
}
// ============================== InputBindBox ================================
InputBindBox::InputBindBox(Binding& binding, glm::vec4 padding)
: Panel(glm::vec2(100,32), padding, 0),

View file

@ -122,6 +122,8 @@ namespace gui {
virtual std::wstring getText() const;
/* Set TextBox content text */
virtual void setText(std::wstring value);
virtual std::wstring getPlaceholder() const;
virtual void setPlaceholder(const std::wstring&);
virtual bool validate();
virtual void setValid(bool valid);
virtual bool isValid() const;

View file

@ -645,6 +645,6 @@ void Hud::setPause(bool pause) {
menu->setVisible(pause);
}
Player* Hud::getPlayer() const {
std::shared_ptr<Player> Hud::getPlayer() const {
return frontend->getLevel()->player;
}

View file

@ -118,7 +118,7 @@ public:
void remove(HudElement& element);
void remove(std::shared_ptr<gui::UINode> node);
Player* getPlayer() const;
std::shared_ptr<Player> getPlayer() const;
};
#endif /* SRC_HUD_H_ */