mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00: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:
parent
894008ce6f
commit
69a2099c04
10 changed files with 151 additions and 39 deletions
|
@ -19,6 +19,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
#include "guiVolumeChange.h"
|
||||
#include "debug.h"
|
||||
#include "guiButton.h"
|
||||
#include "serialization.h"
|
||||
#include <string>
|
||||
#include <IGUICheckBox.h>
|
||||
|
@ -103,8 +104,7 @@ void GUIVolumeChange::regenerateGui(v2u32 screensize)
|
|||
core::rect<s32> rect(0, 0, 80 * s, 30 * s);
|
||||
rect = rect + v2s32(size.X / 2 - 80 * s / 2, size.Y / 2 + 55 * s);
|
||||
const wchar_t *text = wgettext("Exit");
|
||||
Environment->addButton(rect, this, ID_soundExitButton,
|
||||
text);
|
||||
GUIButton::addButton(Environment, rect, this, ID_soundExitButton, text);
|
||||
delete[] text;
|
||||
}
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue