mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Add more visual feedback for button states (#8916)
- Add style properties for overriding the the hovered/pressed state - By default, hovered buttons are a lighter version of the base color - By default, pressed buttons are a darker version of the base color - Add hovered bg image support for image buttons (style property)
This commit is contained in:
@@ -20,6 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
|
||||
#include "guiConfirmRegistration.h"
|
||||
#include "client/client.h"
|
||||
#include "guiButton.h"
|
||||
#include <IGUICheckBox.h>
|
||||
#include <IGUIButton.h>
|
||||
#include <IGUIStaticText.h>
|
||||
@@ -128,14 +129,14 @@ void GUIConfirmRegistration::regenerateGui(v2u32 screensize)
|
||||
core::rect<s32> rect2(0, 0, 230 * s, 35 * s);
|
||||
rect2 = rect2 + v2s32(size.X / 2 - 220 * s, ypos);
|
||||
text = wgettext("Register and Join");
|
||||
Environment->addButton(rect2, this, ID_confirm, text);
|
||||
GUIButton::addButton(Environment, rect2, this, ID_confirm, text);
|
||||
delete[] text;
|
||||
}
|
||||
{
|
||||
core::rect<s32> rect2(0, 0, 120 * s, 35 * s);
|
||||
rect2 = rect2 + v2s32(size.X / 2 + 70 * s, ypos);
|
||||
text = wgettext("Cancel");
|
||||
Environment->addButton(rect2, this, ID_cancel, text);
|
||||
GUIButton::addButton(Environment, rect2, this, ID_cancel, text);
|
||||
delete[] text;
|
||||
}
|
||||
{
|
||||
|
Reference in New Issue
Block a user