From 563a2231d622b04c1a7ecafa742e6d7e151bafbd Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Thu, 31 Jul 2025 12:50:26 -0500 Subject: [PATCH] when hiding window hide tooltip and rightclick menu --- src/kiss_flixel/SimpleWindow.kiss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/kiss_flixel/SimpleWindow.kiss b/src/kiss_flixel/SimpleWindow.kiss index 6394783..801507a 100644 --- a/src/kiss_flixel/SimpleWindow.kiss +++ b/src/kiss_flixel/SimpleWindow.kiss @@ -651,6 +651,10 @@ (FlxG.cameras.remove controlCamera false) (FlxG.state.remove this true) (FlxG.state.remove controls true) + + (hideTooltipText) + (when (rightClickMenu?.isShown) (rightClickMenu.hide)) + (when selectionMarker (FlxG.state.remove selectionMarker true)) (windowStack.remove this) @@ -1029,6 +1033,8 @@ (set xText.x width) (-= xText.x xText.width))) +(prop &mut :SimpleWindow rightClickMenu) + (method :Void showRightClickMenu [:FlxSprite control :Map altActions] (hideTooltipText) // alt action keys can start with numbers and be sorted lexicographically, @@ -1051,6 +1057,7 @@ ->choice ((dictGet altActions (dictGet keysWithoutNumberMap choice)) control) (objectWith [choiceColor textColor xButton true] bgColor))] + (set rightClickMenu choiceWindow) // set up choiceWindow with position where it should be etc (set choiceWindow.camera controlCamera) (choiceWindow.moveTo mousePos)