From 69a2099c04527404f2d0942f2088b3d22dd75b5a Mon Sep 17 00:00:00 2001 From: Hugues Ross Date: Sat, 12 Oct 2019 12:44:23 -0400 Subject: 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) --- src/gui/guiConfirmRegistration.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gui/guiConfirmRegistration.cpp') diff --git a/src/gui/guiConfirmRegistration.cpp b/src/gui/guiConfirmRegistration.cpp index 6fe2a4fc4..49b81b01d 100644 --- a/src/gui/guiConfirmRegistration.cpp +++ b/src/gui/guiConfirmRegistration.cpp @@ -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 #include #include @@ -128,14 +129,14 @@ void GUIConfirmRegistration::regenerateGui(v2u32 screensize) core::rect 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 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; } { -- cgit v1.2.3