From 2de8865b8b689b5cbb3b342da7041f9c11e97309 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Mon, 13 Jan 2020 13:15:06 +0200 Subject: [PATCH] Keep tool icon checkbox visible when a tool is selected --- Scripts/Dialogs/AboutDialog.gd | 1 + Scripts/Main.gd | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Scripts/Dialogs/AboutDialog.gd b/Scripts/Dialogs/AboutDialog.gd index b995ad0af..7e915c0e5 100644 --- a/Scripts/Dialogs/AboutDialog.gd +++ b/Scripts/Dialogs/AboutDialog.gd @@ -25,6 +25,7 @@ func _ready() -> void: contributors.create_item(contributor_root).set_text(0, " Subhang Nanduri") contributors.create_item(contributor_root).set_text(0, " danielnaoexiste") contributors.create_item(contributor_root).set_text(0, " huskee") + contributors.create_item(contributor_root).set_text(0, " haonkrub") var donors_root := donors.create_item() donors.create_item(donors_root).set_text(0, " pcmxms") diff --git a/Scripts/Main.gd b/Scripts/Main.gd index bb545cde3..eaae74d25 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -550,8 +550,8 @@ func _on_Tool_pressed(tool_pressed : BaseButton, mouse_press := true, key_for_le if (mouse_press && Input.is_action_just_released("left_mouse")) || (!mouse_press && key_for_left): Global.current_left_tool = current_action - # Start from 2, so the label and the cursor checkbox won't get invisible - for i in range(2, Global.left_tool_options_container.get_child_count()): + # Start from 3, so the label and checkboxes won't get invisible + for i in range(3, Global.left_tool_options_container.get_child_count()): Global.left_tool_options_container.get_child(i).visible = false # Tool options visible depending on the selected tool @@ -577,8 +577,8 @@ func _on_Tool_pressed(tool_pressed : BaseButton, mouse_press := true, key_for_le elif (mouse_press && Input.is_action_just_released("right_mouse")) || (!mouse_press && !key_for_left): Global.current_right_tool = current_action - # Start from 2, so the label and the cursor checkbox won't get invisible - for i in range(2, Global.right_tool_options_container.get_child_count()): + # Start from 3, so the label and checkboxes won't get invisible + for i in range(3, Global.right_tool_options_container.get_child_count()): Global.right_tool_options_container.get_child(i).visible = false # Tool options visible depending on the selected tool