From b817205ed9afe6a75c91a2ddfa74c5810a54dd5f Mon Sep 17 00:00:00 2001
From: thecozies <79979276+thecozies@users.noreply.github.com>
Date: Fri, 13 Sep 2024 10:13:52 -0500
Subject: [PATCH] init mod menu + bem class + button presets
---
CMakeLists.txt | 2 +
assets/config_menu/controls.rml | 4 +-
assets/launcher.rml | 1 +
assets/recomp.rcss | 2 +-
assets/scss/styles/components/IconButton.scss | 4 +-
assets/scss/styles/components/ModMenu.scss | 87 +++++++++++++++++++
.../scss/styles/components/_components.scss | 1 +
include/recomp_ui.h | 1 +
src/ui/elements/ElementModMenu.cpp | 66 ++++++++++++++
src/ui/elements/ElementModMenu.h | 15 ++++
src/ui/elements/presets.cpp | 39 +++++++++
src/ui/elements/presets.h | 11 +++
src/ui/ui_elements.cpp | 4 +-
src/ui/ui_elements.h | 1 +
src/ui/util/bem.h | 33 +++++++
15 files changed, 263 insertions(+), 8 deletions(-)
create mode 100644 assets/scss/styles/components/ModMenu.scss
create mode 100644 src/ui/elements/ElementModMenu.cpp
create mode 100644 src/ui/elements/ElementModMenu.h
create mode 100644 src/ui/elements/presets.cpp
create mode 100644 src/ui/elements/presets.h
create mode 100644 src/ui/util/bem.h
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1152660..d748027 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -171,6 +171,8 @@ set (SOURCES
${CMAKE_SOURCE_DIR}/src/ui/elements/ElementOptionTypeRadioTabs.cpp
${CMAKE_SOURCE_DIR}/src/ui/elements/ElementOptionTypeRange.cpp
${CMAKE_SOURCE_DIR}/src/ui/elements/ElementOptionTypeTextField.cpp
+ ${CMAKE_SOURCE_DIR}/src/ui/elements/ElementModMenu.cpp
+ ${CMAKE_SOURCE_DIR}/src/ui/elements/presets.cpp
${CMAKE_SOURCE_DIR}/rsp/aspMain.cpp
${CMAKE_SOURCE_DIR}/rsp/njpgdspMain.cpp
diff --git a/assets/config_menu/controls.rml b/assets/config_menu/controls.rml
index 3a8371e..d947ae8 100644
--- a/assets/config_menu/controls.rml
+++ b/assets/config_menu/controls.rml
@@ -71,7 +71,7 @@
data-event-blur="set_input_row_focus(-1)"
data-event-focus="set_input_row_focus(i)"
data-event-click="clear_input_bindings(i)"
- class="icon-button icon-button--danger"
+ class="icon-button icon-button--error"
data-attr-style="i == 0 ? 'nav-up:#cont_kb_toggle' : 'nav-up:auto'"
>
@@ -81,7 +81,7 @@
data-event-blur="set_input_row_focus(-1)"
data-event-focus="set_input_row_focus(i)"
data-event-click="reset_single_input_binding_to_default(i)"
- class="icon-button icon-button--danger"
+ class="icon-button icon-button--error"
data-attr-style="i == 0 ? 'nav-up:#cont_kb_toggle' : 'nav-up:auto'"
>
diff --git a/assets/launcher.rml b/assets/launcher.rml
index 6496117..805d5be 100644
--- a/assets/launcher.rml
+++ b/assets/launcher.rml
@@ -61,6 +61,7 @@
+