Impl Reset button and fix some naming (#190)
* Compile works now * Update menus * Update CMakeLists.txt
This commit is contained in:
parent
6eb0ee294b
commit
a6ecc276e9
|
|
@ -671,4 +671,4 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|||
endif()
|
||||
|
||||
set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_SOURCE_DIR}/cmake/configure-packaging.cmake)
|
||||
include(cmake/packaging.cmake)
|
||||
include(cmake/packaging.cmake)
|
||||
|
|
|
|||
|
|
@ -646,15 +646,7 @@ void Menu::DrawElement() {
|
|||
UIWidgets::ButtonOptions options2 = {};
|
||||
options2.color = UIWidgets::Colors::Red;
|
||||
options2.size = UIWidgets::Sizes::Inline;
|
||||
options2.tooltip = "Reset"
|
||||
#ifdef __APPLE__
|
||||
" (Command-R)"
|
||||
#elif !defined(__SWITCH__) && !defined(__WIIU__)
|
||||
" (Ctrl+R)"
|
||||
#else
|
||||
""
|
||||
#endif
|
||||
;
|
||||
options2.tooltip = "Reset";
|
||||
if (UIWidgets::Button(ICON_FA_UNDO, options2)) {
|
||||
ProcessReset();
|
||||
}
|
||||
|
|
@ -662,7 +654,7 @@ void Menu::DrawElement() {
|
|||
UIWidgets::ButtonOptions options3 = {};
|
||||
options3.color = UIWidgets::Colors::Red;
|
||||
options3.size = UIWidgets::Sizes::Inline;
|
||||
options3.tooltip = "Quit 2S2H";
|
||||
options3.tooltip = "Quit";
|
||||
if (UIWidgets::Button(ICON_FA_POWER_OFF, options3)) {
|
||||
if (!popped) {
|
||||
ToggleVisibility();
|
||||
|
|
|
|||
|
|
@ -6,6 +6,12 @@
|
|||
#include "graphic/Fast3D/gfx_rendering_api.h"
|
||||
#include "MenuTypes.h"
|
||||
|
||||
extern "C" {
|
||||
#include "defines.h"
|
||||
#include "main.h"
|
||||
#include "menus.h"
|
||||
}
|
||||
|
||||
namespace Ship {
|
||||
uint32_t GetVectorIndexOf(std::vector<std::string>& vector, std::string value);
|
||||
class Menu : public GuiWindow {
|
||||
|
|
@ -51,7 +57,14 @@ class Menu : public GuiWindow {
|
|||
.options = std::make_shared<UIWidgets::WidgetOptions>(UIWidgets::WidgetOptions{}.Tooltip(
|
||||
"Searches all menus for the given text, including tooltips.")) } } }
|
||||
};
|
||||
virtual void ProcessReset() {}
|
||||
virtual void ProcessReset() {
|
||||
gGamestateNext = MAIN_MENU_FROM_QUIT;
|
||||
if (CVarGetInteger("gEnableDebugMode", 0) == true) {
|
||||
gMenuSelection = START_MENU;
|
||||
} else {
|
||||
gMenuSelection = LOGO_INTRO_MENU;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
bool allowPopout = true; // PortNote: should be set to false on small screen ports
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ void PortMenu::AddDevTools() {
|
|||
.CVar("gGameInfoEnabled")
|
||||
.Options(ButtonOptions().Tooltip(
|
||||
"Shows the game info window, contains player and actor information"))
|
||||
.WindowName("GfxDebuggerWindow");
|
||||
.WindowName("GameInfo");
|
||||
|
||||
path = { "Developer", "Stats", SECTION_COLUMN_1 };
|
||||
AddSidebarEntry("Developer", "Stats", 1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue