From 2eb6a1c5be776c5ec7488f4f749562f1e5ccc3e7 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Fri, 22 Nov 2024 03:35:26 -0500 Subject: [PATCH] Rename GUI Flags To UI --- docs/CHANGELOG.md | 5 +++++ libreborn/src/util/flags/available-feature-flags | 10 +++++----- mods/src/misc/graphics.cpp | 2 +- mods/src/misc/ui.cpp | 2 +- mods/src/touch/touch.cpp | 10 +++++----- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index fd83604b79..f2517f8d62 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -88,6 +88,11 @@ * `Disable Buggy Held Item Caching` To `Fix Held Item Caching` * `Disable 'gui_blocks' Atlas` To `Regenerate "gui_blocks" Atlas` * `Fix Sign Placement` To `Enable Sign Screen` + * `Force Touch GUI Inventory` To `Force Touch UI Inventory` + * `Full Touch GUI` To `Full Touch UI` + * `Force Touch GUI Button Behavior` To `Force Touch UI Button Behavior` + * `Remove Forced GUI Lag (Can Break Joining Servers)` To `Remove Forced UI Lag (Can Break Joining Servers)` + * `Hide Block Outline When GUI Is Hidden` To `Hide Block Outline When UI Is Hidden` * Add Milk Buckets * Included In The `Add Buckets` Feature Flag * Removed `Property Scale Animated Textures` Feature Flag diff --git a/libreborn/src/util/flags/available-feature-flags b/libreborn/src/util/flags/available-feature-flags index 2a9233b97a..be39b048f3 100644 --- a/libreborn/src/util/flags/available-feature-flags +++ b/libreborn/src/util/flags/available-feature-flags @@ -20,7 +20,7 @@ CATEGORY User Interface CATEGORY Options TRUE Fix Options Screen TRUE Add Reborn Info To Options - TRUE Force Touch GUI Inventory + TRUE Force Touch UI Inventory TRUE Fix Pause Menu TRUE Close Current Screen On Death TRUE Implement Create World Dialog @@ -37,10 +37,10 @@ CATEGORY User Interface CATEGORY Text TRUE Load Language Files TRUE Add Missing Language Strings - FALSE Full Touch GUI - TRUE Force Touch GUI Button Behavior + FALSE Full Touch UI + TRUE Force Touch UI Button Behavior TRUE Improved Cursor Rendering - FALSE Remove Forced GUI Lag (Can Break Joining Servers) + FALSE Remove Forced UI Lag (Can Break Joining Servers) TRUE Improved Button Hover Behavior TRUE Classic Item Count UI TRUE Click Buttons On Mouse Down @@ -55,7 +55,7 @@ CATEGORY Rendering CATEGORY Block Outline TRUE Show Block Outlines TRUE Replace Block Highlight With Outline - TRUE Hide Block Outline When GUI Is Hidden + TRUE Hide Block Outline When UI Is Hidden CATEGORY Block Tinting FALSE Add Biome Colors To Grass FALSE Disable Block Tinting diff --git a/mods/src/misc/graphics.cpp b/mods/src/misc/graphics.cpp index ffa78a921e..bc56bb34e3 100644 --- a/mods/src/misc/graphics.cpp +++ b/mods/src/misc/graphics.cpp @@ -527,7 +527,7 @@ void _init_misc_graphics() { } // Properly Hide Block Outline - if (feature_has("Hide Block Outline When GUI Is Hidden", server_disabled)) { + if (feature_has("Hide Block Outline When UI Is Hidden", server_disabled)) { overwrite_calls(LevelRenderer_renderHitSelect, [](LevelRenderer_renderHitSelect_t original, LevelRenderer *self, Player *player, const HitResult &hit_result, const int i, void *vp, const float f) { if (!self->minecraft->options.hide_gui) { original(self, player, hit_result, i, vp, f); diff --git a/mods/src/misc/ui.cpp b/mods/src/misc/ui.cpp index 928be4b61e..da91848fff 100644 --- a/mods/src/misc/ui.cpp +++ b/mods/src/misc/ui.cpp @@ -299,7 +299,7 @@ void _init_misc_ui() { } // Remove Forced GUI Lag - if (feature_has("Remove Forced GUI Lag (Can Break Joining Servers)", server_enabled)) { + if (feature_has("Remove Forced UI Lag (Can Break Joining Servers)", server_enabled)) { overwrite_calls(Common_sleepMs, nop); } diff --git a/mods/src/touch/touch.cpp b/mods/src/touch/touch.cpp index 6c5665b493..63f09f3240 100644 --- a/mods/src/touch/touch.cpp +++ b/mods/src/touch/touch.cpp @@ -61,8 +61,8 @@ Button *touch_create_button(const int id, const std::string &text) { // Init void init_touch() { - touch_gui = feature_has("Full Touch GUI", server_disabled); - int touch_buttons = touch_gui; + touch_gui = feature_has("Full Touch UI", server_disabled); + bool touch_buttons = touch_gui; if (touch_gui) { // Main UI overwrite_calls(Minecraft_isTouchscreen, Minecraft_isTouchscreen_injection); @@ -72,7 +72,7 @@ void init_touch() { patch((void *) 0x257b0, toolbar_patch); } else { // Force Touch Inventory - if (feature_has("Force Touch GUI Inventory", server_disabled)) { + if (feature_has("Force Touch UI Inventory", server_disabled)) { overwrite_call((void *) 0x2943c, (void *) operator_new_IngameBlockSelectionScreen_injection); overwrite_call((void *) 0x29444, (void *) Touch_IngameBlockSelectionScreen_constructor->get(true)); // Make "Craft" And "Armor" Buttons Use Classic GUI Style (Button And TButton Have The Same Size) @@ -81,8 +81,8 @@ void init_touch() { } // Force Touch Button Behavior - if (feature_has("Force Touch GUI Button Behavior", server_disabled)) { - touch_buttons = 1; + if (feature_has("Force Touch UI Button Behavior", server_disabled)) { + touch_buttons = true; overwrite_call((void *) 0x1baf4, (void *) Minecraft_isTouchscreen_injection); overwrite_call((void *) 0x1be40, (void *) Minecraft_isTouchscreen_injection); overwrite_call((void *) 0x1c470, (void *) Minecraft_isTouchscreen_injection);