From 7218aba8c37ce2c3e593b4484fce590134251651 Mon Sep 17 00:00:00 2001 From: Marisa the Magician Date: Fri, 10 Mar 2023 16:04:07 +0100 Subject: [PATCH] Fix mouse input in library tab. --- language.version | 4 ++-- zscript/kbase/swwm_kbasetab_library.zsc | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/language.version b/language.version index 9f7c6ddb0..3a1cdd220 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r770 \cu(Fri 10 Mar 19:41:58 CET 2023)\c-"; -SWWM_SHORTVER="\cw1.3pre r770 \cu(2023-03-10 19:41:58)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r771 \cu(Fri 10 Mar 19:42:05 CET 2023)\c-"; +SWWM_SHORTVER="\cw1.3pre r771 \cu(2023-03-10 19:42:05)\c-"; diff --git a/zscript/kbase/swwm_kbasetab_library.zsc b/zscript/kbase/swwm_kbasetab_library.zsc index 6a838e386..b6d5119bd 100644 --- a/zscript/kbase/swwm_kbasetab_library.zsc +++ b/zscript/kbase/swwm_kbasetab_library.zsc @@ -261,6 +261,9 @@ Class DemolitionistLibraryTab : DemolitionistMenuTab case MB_RELEASE: drag[0] = drag[1] = false; break; + case MB_RIGHT: + MenuInput(MK_BACK); + break; } // mouse on left side if ( pos.x < (lwidth+((maxofs[section]>0)?8:0)) ) @@ -301,14 +304,10 @@ Class DemolitionistLibraryTab : DemolitionistMenuTab continue; sel[section] = lists[section].selected = i; KBScroll(); - if ( active && (lists[section].items[i] == active) ) - MenuInput(MK_BACK); - else - { - if ( active ) active.bActive = false; - clore = null; - MenuInput(MK_ENTER); - } + if ( active && (lists[section].items[i] == active) && (clore == active.ent) ) + break; + clore = null; + MenuInput(MK_ENTER); break; } break;