From e42c4d3174321c1fecd0a3b5ef376c753d891289 Mon Sep 17 00:00:00 2001 From: SuperDude88 <82904174+SuperDude88@users.noreply.github.com> Date: Fri, 8 May 2026 23:19:48 -0400 Subject: [PATCH 1/2] Number Button Fix - Add `is_editing` helper to BaseStringButton - Block left/right input from changing number while typing Resolves #706 --- src/dusk/ui/number_button.cpp | 4 ++-- src/dusk/ui/string_button.cpp | 10 +++++----- src/dusk/ui/string_button.hpp | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/dusk/ui/number_button.cpp b/src/dusk/ui/number_button.cpp index ab5095cf3f..3735855140 100644 --- a/src/dusk/ui/number_button.cpp +++ b/src/dusk/ui/number_button.cpp @@ -54,7 +54,7 @@ void NumberButton::set_value(Rml::String value) { } bool NumberButton::handle_nav_command(NavCommand cmd) { - if (cmd == NavCommand::Left || cmd == NavCommand::Right) { + if (!is_editing() && (cmd == NavCommand::Left || cmd == NavCommand::Right)) { const int newValue = std::clamp( mGetValue() + (cmd == NavCommand::Right ? mStep : -mStep), mMin, mMax); if (newValue != mGetValue()) { @@ -66,4 +66,4 @@ bool NumberButton::handle_nav_command(NavCommand cmd) { return BaseStringButton::handle_nav_command(cmd); } -} // namespace dusk::ui \ No newline at end of file +} // namespace dusk::ui diff --git a/src/dusk/ui/string_button.cpp b/src/dusk/ui/string_button.cpp index a267e5b0e0..7210e87803 100644 --- a/src/dusk/ui/string_button.cpp +++ b/src/dusk/ui/string_button.cpp @@ -24,7 +24,7 @@ void BaseStringButton::update() { } void BaseStringButton::start_editing() { - if (mInputElem != nullptr) { + if (is_editing()) { return; } @@ -79,14 +79,14 @@ void BaseStringButton::request_stop_editing(bool commit, bool refocusRoot) { bool BaseStringButton::handle_nav_command(NavCommand cmd) { if (cmd == NavCommand::Confirm) { - if (mInputElem == nullptr) { + if (!is_editing()) { start_editing(); } else { request_stop_editing(true, true); } return true; } else if (cmd == NavCommand::Cancel) { - if (mInputElem != nullptr) { + if (is_editing()) { request_stop_editing(false, true); return true; } @@ -95,7 +95,7 @@ bool BaseStringButton::handle_nav_command(NavCommand cmd) { } void BaseStringButton::focus_input() { - if (mInputElem == nullptr) { + if (!is_editing()) { return; } @@ -111,7 +111,7 @@ void BaseStringButton::focus_input() { void BaseStringButton::stop_editing(bool commit, bool refocusRoot) { mPendingStopEditing = false; mPendingInputFocusFrames = 0; - if (mInputElem == nullptr) { + if (!is_editing()) { return; } if (commit) { diff --git a/src/dusk/ui/string_button.hpp b/src/dusk/ui/string_button.hpp index d84b977f37..94f2cebcbe 100644 --- a/src/dusk/ui/string_button.hpp +++ b/src/dusk/ui/string_button.hpp @@ -20,6 +20,7 @@ public: void request_stop_editing(bool commit, bool refocusRoot); protected: + bool is_editing() { return mInputElem != nullptr; } bool handle_nav_command(NavCommand cmd) override; virtual void set_value(Rml::String value) = 0; virtual Rml::String input_value() { return format_value(); } From 13dd3c3932e3db8c38aaec2a66953d9120c96062 Mon Sep 17 00:00:00 2001 From: SuperDude88 <82904174+SuperDude88@users.noreply.github.com> Date: Sat, 9 May 2026 08:30:46 -0400 Subject: [PATCH 2/2] Clamp LOD For Cutscene Midna (#728) - Sets max eye LOD level to 0 for `demo00_Midna_cut00_FC_tongue` and `demo00_Midna_cut00_BD_tmp` --- src/d/actor/d_a_midna.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/d/actor/d_a_midna.cpp b/src/d/actor/d_a_midna.cpp index 2356b693be..3bc500991d 100644 --- a/src/d/actor/d_a_midna.cpp +++ b/src/d/actor/d_a_midna.cpp @@ -419,9 +419,30 @@ int daMidna_c::createHeap() { return 0; } +#if TARGET_PC + if (mpDemoFCTongueBmd != NULL) { + if(!daAlink_c::initDemoBck(&mpDemoFCTmpBck, "demo00_Midna_cut00_FC_tmp.bck")) { + return 0; + } + + // Update Midna's eye maxLOD to prevent the eyes from disappearing + J3DTexture* tex = mpDemoFCTongueBmd->getModelData()->getTexture(); + JUTNameTab* nametable = mpDemoFCTongueBmd->getModelData()->getTextureName(); + if (tex != nullptr && nametable != nullptr) { + for (u16 i = 0; i < tex->getNum(); i++) { + const char* tex_name = nametable->getName(i); + if (tex_name != NULL && strcmp(tex_name, "midona_eyeball") == 0) { + ResTIMG* timg = tex->getResTIMG(i); + timg->maxLOD = 0; + } + } + } + } +#else if (mpDemoFCTongueBmd != NULL && !daAlink_c::initDemoBck(&mpDemoFCTmpBck, "demo00_Midna_cut00_FC_tmp.bck")) { return 0; } +#endif modelData = (J3DModelData*)dComIfG_getObjectRes(dStage_roomControl_c::getDemoArcName(), "demo00_Midna_cut00_BD_tmp.bmd"); @@ -433,6 +454,21 @@ int daMidna_c::createHeap() { modelData->getMaterialNodePointer(2)->setMaterialAnm(mpEyeMatAnm[0]); modelData->getMaterialNodePointer(3)->setMaterialAnm(mpEyeMatAnm[1]); + +#if TARGET_PC + // Update Midna's eye maxLOD to prevent the eyes from disappearing + J3DTexture* tex = modelData->getTexture(); + JUTNameTab* nametable = modelData->getTextureName(); + if (tex != nullptr && nametable != nullptr) { + for (u16 i = 0; i < tex->getNum(); i++) { + const char* tex_name = nametable->getName(i); + if (tex_name != NULL && strcmp(tex_name, "midona_eyeball") == 0) { + ResTIMG* timg = tex->getResTIMG(i); + timg->maxLOD = 0; + } + } + } +#endif } if (!initDemoModel(&mpDemoBDMaskBmd, "demo00_Midna_cut00_BD_mask.bmd", 0)) {