mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-03-12 22:35:18 +00:00
Changed which tool options are visible for when each tool is selected
This commit is contained in:
parent
9e0c62773c
commit
6056ff4857
1 changed files with 16 additions and 10 deletions
|
@ -654,28 +654,31 @@ func _on_Tool_pressed(tool_pressed : BaseButton, mouse_press := true, key_for_le
|
|||
if (mouse_press and Input.is_action_just_released("left_mouse")) or (!mouse_press and key_for_left):
|
||||
Global.current_left_tool = current_action
|
||||
|
||||
# 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()):
|
||||
# Start from 1, so the label won't get invisible
|
||||
for i in range(1, 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
|
||||
if current_action == "Pencil":
|
||||
Global.left_brush_type_container.visible = true
|
||||
# Global.left_brush_size_container.visible = true
|
||||
Global.left_brush_size_slider.visible = true
|
||||
Global.left_mirror_container.visible = true
|
||||
if Global.current_left_brush_type == Global.Brush_Types.FILE or Global.current_left_brush_type == Global.Brush_Types.CUSTOM or Global.current_left_brush_type == Global.Brush_Types.RANDOM_FILE:
|
||||
Global.left_color_interpolation_container.visible = true
|
||||
elif current_action == "Eraser":
|
||||
Global.left_brush_type_container.visible = true
|
||||
# Global.left_brush_size_container.visible = true
|
||||
Global.left_brush_size_slider.visible = true
|
||||
Global.left_mirror_container.visible = true
|
||||
elif current_action == "Bucket":
|
||||
Global.left_brush_type_container.visible = true
|
||||
Global.left_brush_size_slider.visible = true
|
||||
Global.left_fill_area_container.visible = true
|
||||
Global.left_mirror_container.visible = true
|
||||
if Global.current_left_brush_type == Global.Brush_Types.FILE or Global.current_left_brush_type == Global.Brush_Types.CUSTOM or Global.current_left_brush_type == Global.Brush_Types.RANDOM_FILE:
|
||||
Global.left_color_interpolation_container.visible = true
|
||||
elif current_action == "LightenDarken":
|
||||
# Global.left_brush_size_container.visible = true
|
||||
Global.left_brush_type_container.visible = true
|
||||
Global.left_brush_size_slider.visible = true
|
||||
Global.left_ld_container.visible = true
|
||||
Global.left_mirror_container.visible = true
|
||||
elif current_action == "ColorPicker":
|
||||
|
@ -683,28 +686,31 @@ func _on_Tool_pressed(tool_pressed : BaseButton, mouse_press := true, key_for_le
|
|||
|
||||
elif (mouse_press and Input.is_action_just_released("right_mouse")) or (!mouse_press and !key_for_left):
|
||||
Global.current_right_tool = current_action
|
||||
# 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()):
|
||||
# Start from 1, so the label won't get invisible
|
||||
for i in range(1, 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
|
||||
if current_action == "Pencil":
|
||||
Global.right_brush_type_container.visible = true
|
||||
# Global.right_brush_size_container.visible = true
|
||||
Global.right_brush_size_slider.visible = true
|
||||
Global.right_mirror_container.visible = true
|
||||
if Global.current_right_brush_type == Global.Brush_Types.FILE or Global.current_right_brush_type == Global.Brush_Types.CUSTOM or Global.current_right_brush_type == Global.Brush_Types.RANDOM_FILE:
|
||||
Global.right_color_interpolation_container.visible = true
|
||||
elif current_action == "Eraser":
|
||||
Global.right_brush_type_container.visible = true
|
||||
# Global.right_brush_size_container.visible = true
|
||||
Global.right_brush_size_slider.visible = true
|
||||
Global.right_mirror_container.visible = true
|
||||
elif current_action == "Bucket":
|
||||
Global.right_brush_type_container.visible = true
|
||||
Global.right_brush_size_slider.visible = true
|
||||
Global.right_fill_area_container.visible = true
|
||||
Global.right_mirror_container.visible = true
|
||||
if Global.current_right_brush_type == Global.Brush_Types.FILE or Global.current_right_brush_type == Global.Brush_Types.CUSTOM or Global.current_right_brush_type == Global.Brush_Types.RANDOM_FILE:
|
||||
Global.right_color_interpolation_container.visible = true
|
||||
elif current_action == "LightenDarken":
|
||||
# Global.right_brush_size_container.visible = true
|
||||
Global.right_brush_type_container.visible = true
|
||||
Global.right_brush_size_slider.visible = true
|
||||
Global.right_ld_container.visible = true
|
||||
Global.right_mirror_container.visible = true
|
||||
elif current_action == "ColorPicker":
|
||||
|
|
Loading…
Add table
Reference in a new issue