1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

Keep tool icon checkbox visible when a tool is selected

This commit is contained in:
OverloadedOrama 2020-01-13 13:15:06 +02:00
parent 52ea30f5ee
commit 2de8865b8b
2 changed files with 5 additions and 4 deletions

View file

@ -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")

View file

@ -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