From b5b5234613edbd604885804e4606df99b4bb5f18 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 19 May 2024 22:27:19 -0700 Subject: [PATCH] only show tooltips when window in focus --- 0012-on.draw | 4 +++- 0177-Window_in_focus | 1 + 0178-on.focus | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 0177-Window_in_focus create mode 100644 0178-on.focus diff --git a/0012-on.draw b/0012-on.draw index 44b685f..6389088 100644 --- a/0012-on.draw +++ b/0012-on.draw @@ -25,5 +25,7 @@ on.draw = function() end draw_menu() draw_next_frames_of_animations() - draw_button_tooltips(Global_state) + if Window_in_focus then + draw_button_tooltips(Global_state) + end end \ No newline at end of file diff --git a/0177-Window_in_focus b/0177-Window_in_focus new file mode 100644 index 0000000..353ec2a --- /dev/null +++ b/0177-Window_in_focus @@ -0,0 +1 @@ +Window_focus = true \ No newline at end of file diff --git a/0178-on.focus b/0178-on.focus new file mode 100644 index 0000000..a7acca6 --- /dev/null +++ b/0178-on.focus @@ -0,0 +1,3 @@ +on.focus = function(in_focus) + Window_in_focus = in_focus +end \ No newline at end of file