mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-25 22:46:32 -04:00
RmlUi improvements (#663)
* rmlui audio * fix menu select sound * Fixes #662 * fix reset logic and fix popup getting stuck closed * fix X button on menu popup * rmlui achievements, and fix open/close bug * presets, achievements css, and menu sounds toggle * forgor * fix b button causing audio when menu not visible
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
#include "bool_button.hpp"
|
||||
|
||||
#include "Z2AudioLib/Z2SeMgr.h"
|
||||
#include "m_Do/m_Do_audio.h"
|
||||
|
||||
namespace dusk::ui {
|
||||
|
||||
BoolButton::BoolButton(Rml::Element* parent, Props props)
|
||||
@@ -31,7 +34,9 @@ Rml::String BoolButton::format_value() {
|
||||
|
||||
bool BoolButton::handle_nav_command(NavCommand cmd) {
|
||||
if (cmd == NavCommand::Confirm || cmd == NavCommand::Left || cmd == NavCommand::Right) {
|
||||
mSetValue(!mGetValue());
|
||||
const bool newValue = !mGetValue();
|
||||
mSetValue(newValue);
|
||||
mDoAud_seStartMenu(newValue ? Z2SE_SY_CURSOR_OK : Z2SE_SY_CURSOR_CANCEL);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user