mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Separate global tool options from the color pickers
This commit is contained in:
parent
bec30112f6
commit
b316cadfb8
|
@ -1,4 +1,4 @@
|
|||
[gd_resource type="Resource" load_steps=21 format=2]
|
||||
[gd_resource type="Resource" load_steps=23 format=2]
|
||||
|
||||
[ext_resource path="res://addons/dockable_container/layout_panel.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/dockable_container/layout_split.gd" type="Script" id=2]
|
||||
|
@ -56,13 +56,27 @@ script = ExtResource( 1 )
|
|||
names = PoolStringArray( "Color Pickers" )
|
||||
current_tab = 0
|
||||
|
||||
[sub_resource type="Resource" id=30]
|
||||
resource_name = "Tabs"
|
||||
script = ExtResource( 1 )
|
||||
names = PoolStringArray( "Global Tool Options" )
|
||||
current_tab = 0
|
||||
|
||||
[sub_resource type="Resource" id=31]
|
||||
resource_name = "Split"
|
||||
script = ExtResource( 2 )
|
||||
direction = 1
|
||||
percent = 0.5
|
||||
first = SubResource( 20 )
|
||||
second = SubResource( 30 )
|
||||
|
||||
[sub_resource type="Resource" id=21]
|
||||
resource_name = "Split"
|
||||
script = ExtResource( 2 )
|
||||
direction = 1
|
||||
percent = 0.911765
|
||||
first = SubResource( 11 )
|
||||
second = SubResource( 20 )
|
||||
second = SubResource( 31 )
|
||||
|
||||
[sub_resource type="Resource" id=22]
|
||||
resource_name = "Tabs"
|
||||
|
@ -118,7 +132,7 @@ second = SubResource( 15 )
|
|||
resource_name = "Split"
|
||||
script = ExtResource( 2 )
|
||||
direction = 0
|
||||
percent = 0.0134804
|
||||
percent = 0.0
|
||||
first = SubResource( 1 )
|
||||
second = SubResource( 16 )
|
||||
|
||||
|
|
|
@ -1,20 +1,23 @@
|
|||
[gd_resource type="Resource" load_steps=21 format=2]
|
||||
[gd_resource type="Resource" load_steps=23 format=2]
|
||||
|
||||
[ext_resource path="res://addons/dockable_container/layout_panel.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/dockable_container/layout.gd" type="Script" id=2]
|
||||
[ext_resource path="res://addons/dockable_container/layout_split.gd" type="Script" id=3]
|
||||
|
||||
[sub_resource type="Resource" id=8]
|
||||
resource_name = "Tabs"
|
||||
script = ExtResource( 1 )
|
||||
names = PoolStringArray( "Main Canvas" )
|
||||
current_tab = 0
|
||||
|
||||
[sub_resource type="Resource" id=23]
|
||||
resource_name = "Tabs"
|
||||
script = ExtResource( 1 )
|
||||
names = PoolStringArray( "Second Canvas" )
|
||||
current_tab = 0
|
||||
|
||||
[sub_resource type="Resource" id=24]
|
||||
resource_name = "Split"
|
||||
script = ExtResource( 3 )
|
||||
direction = 0
|
||||
percent = 0.9875
|
||||
|
@ -22,16 +25,19 @@ first = SubResource( 8 )
|
|||
second = SubResource( 23 )
|
||||
|
||||
[sub_resource type="Resource" id=9]
|
||||
resource_name = "Tabs"
|
||||
script = ExtResource( 1 )
|
||||
names = PoolStringArray( "Tools" )
|
||||
current_tab = 0
|
||||
|
||||
[sub_resource type="Resource" id=10]
|
||||
resource_name = "Tabs"
|
||||
script = ExtResource( 1 )
|
||||
names = PoolStringArray( "Left Tool Options" )
|
||||
current_tab = 0
|
||||
|
||||
[sub_resource type="Resource" id=11]
|
||||
resource_name = "Tabs"
|
||||
script = ExtResource( 1 )
|
||||
names = PoolStringArray( "Right Tool Options" )
|
||||
current_tab = 0
|
||||
|
@ -45,23 +51,41 @@ first = SubResource( 10 )
|
|||
second = SubResource( 11 )
|
||||
|
||||
[sub_resource type="Resource" id=13]
|
||||
resource_name = "Tabs"
|
||||
script = ExtResource( 1 )
|
||||
names = PoolStringArray( "Color Pickers" )
|
||||
current_tab = 0
|
||||
|
||||
[sub_resource type="Resource" id=25]
|
||||
resource_name = "Tabs"
|
||||
script = ExtResource( 1 )
|
||||
names = PoolStringArray( "Global Tool Options" )
|
||||
current_tab = 0
|
||||
|
||||
[sub_resource type="Resource" id=28]
|
||||
resource_name = "Split"
|
||||
script = ExtResource( 3 )
|
||||
direction = 1
|
||||
percent = 0.5
|
||||
first = SubResource( 13 )
|
||||
second = SubResource( 25 )
|
||||
|
||||
[sub_resource type="Resource" id=14]
|
||||
resource_name = "Tabs"
|
||||
script = ExtResource( 1 )
|
||||
names = PoolStringArray( "Canvas Preview" )
|
||||
current_tab = 0
|
||||
|
||||
[sub_resource type="Resource" id=15]
|
||||
resource_name = "Split"
|
||||
script = ExtResource( 3 )
|
||||
direction = 1
|
||||
percent = 0.5
|
||||
first = SubResource( 13 )
|
||||
first = SubResource( 28 )
|
||||
second = SubResource( 14 )
|
||||
|
||||
[sub_resource type="Resource" id=16]
|
||||
resource_name = "Tabs"
|
||||
script = ExtResource( 1 )
|
||||
names = PoolStringArray( "Palette Panel" )
|
||||
current_tab = 0
|
||||
|
@ -89,6 +113,7 @@ names = PoolStringArray( "Animation Timeline" )
|
|||
current_tab = 0
|
||||
|
||||
[sub_resource type="Resource" id=20]
|
||||
resource_name = "Split"
|
||||
script = ExtResource( 3 )
|
||||
direction = 1
|
||||
percent = 0.8125
|
||||
|
@ -96,13 +121,15 @@ first = SubResource( 18 )
|
|||
second = SubResource( 19 )
|
||||
|
||||
[sub_resource type="Resource" id=21]
|
||||
resource_name = "Split"
|
||||
script = ExtResource( 3 )
|
||||
direction = 0
|
||||
percent = 0.0
|
||||
percent = 0.03125
|
||||
first = SubResource( 9 )
|
||||
second = SubResource( 20 )
|
||||
|
||||
[sub_resource type="Resource" id=22]
|
||||
resource_name = "Split"
|
||||
script = ExtResource( 3 )
|
||||
direction = 1
|
||||
percent = 0.5
|
||||
|
|
|
@ -126,7 +126,6 @@ onready var greyscale_vision: ColorRect = control.find_node("GreyscaleVision")
|
|||
onready var preview_zoom_slider: VSlider = control.find_node("PreviewZoomSlider")
|
||||
|
||||
onready var tool_panel: ScrollContainer = control.find_node("Tools")
|
||||
onready var color_pickers: Container = control.find_node("Color Pickers")
|
||||
onready var left_tool_options_scroll: ScrollContainer = control.find_node("Left Tool Options")
|
||||
onready var right_tool_options_scroll: ScrollContainer = control.find_node("Right Tool Options")
|
||||
onready var brushes_popup: Popup = control.find_node("BrushesPopup")
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
extends Container
|
||||
|
||||
onready var left_picker := $VBoxContainer/ColorPickersHorizontal/LeftColorPickerButton
|
||||
onready var right_picker := $VBoxContainer/ColorPickersHorizontal/RightColorPickerButton
|
||||
onready var left_picker := $ColorPickersHorizontal/LeftColorPickerButton
|
||||
onready var right_picker := $ColorPickersHorizontal/RightColorPickerButton
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
Tools.connect("color_changed", self, "update_color")
|
||||
left_picker.get_picker().presets_visible = false
|
||||
right_picker.get_picker().presets_visible = false
|
||||
$VBoxContainer/Mirror/Horizontal.pressed = Tools.horizontal_mirror
|
||||
$VBoxContainer/Mirror/Vertical.pressed = Tools.vertical_mirror
|
||||
|
||||
|
||||
func _on_ColorSwitch_pressed() -> void:
|
||||
|
@ -40,36 +38,3 @@ func update_color(color: Color, button: int) -> void:
|
|||
left_picker.color = color
|
||||
else:
|
||||
right_picker.color = color
|
||||
|
||||
|
||||
func _on_Horizontal_toggled(button_pressed: bool) -> void:
|
||||
Tools.horizontal_mirror = button_pressed
|
||||
Global.config_cache.set_value("preferences", "horizontal_mirror", button_pressed)
|
||||
Global.show_y_symmetry_axis = button_pressed
|
||||
Global.current_project.y_symmetry_axis.visible = (
|
||||
Global.show_y_symmetry_axis
|
||||
and Global.show_guides
|
||||
)
|
||||
|
||||
var texture_button: TextureRect = $VBoxContainer/Mirror/Horizontal/TextureRect
|
||||
var file_name := "horizontal_mirror_on.png"
|
||||
if !button_pressed:
|
||||
file_name = "horizontal_mirror_off.png"
|
||||
Global.change_button_texturerect(texture_button, file_name)
|
||||
|
||||
|
||||
func _on_Vertical_toggled(button_pressed: bool) -> void:
|
||||
Tools.vertical_mirror = button_pressed
|
||||
Global.config_cache.set_value("preferences", "vertical_mirror", button_pressed)
|
||||
Global.show_x_symmetry_axis = button_pressed
|
||||
# If the button is not pressed but another button is, keep the symmetry guide visible
|
||||
Global.current_project.x_symmetry_axis.visible = (
|
||||
Global.show_x_symmetry_axis
|
||||
and Global.show_guides
|
||||
)
|
||||
|
||||
var texture_button: TextureRect = $VBoxContainer/Mirror/Vertical/TextureRect
|
||||
var file_name := "vertical_mirror_on.png"
|
||||
if !button_pressed:
|
||||
file_name = "vertical_mirror_off.png"
|
||||
Global.change_button_texturerect(texture_button, file_name)
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
[gd_scene load_steps=7 format=2]
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://assets/graphics/misc/color_defaults.png" type="Texture" id=1]
|
||||
[ext_resource path="res://assets/graphics/misc/color_switch.png" type="Texture" id=2]
|
||||
[ext_resource path="res://src/UI/ColorPickers.gd" type="Script" id=3]
|
||||
[ext_resource path="res://assets/graphics/misc/vertical_mirror_off.png" type="Texture" id=4]
|
||||
[ext_resource path="res://assets/graphics/misc/horizontal_mirror_off.png" type="Texture" id=5]
|
||||
|
||||
[sub_resource type="ShortCut" id=19]
|
||||
|
||||
|
@ -15,38 +13,35 @@ margin_right = 1276.0
|
|||
margin_bottom = 229.062
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
[node name="ColorPickersHorizontal" type="HBoxContainer" parent="."]
|
||||
margin_left = 7.0
|
||||
margin_top = 7.0
|
||||
margin_right = 311.0
|
||||
margin_bottom = 75.0
|
||||
|
||||
[node name="ColorPickersHorizontal" type="HBoxContainer" parent="VBoxContainer"]
|
||||
margin_right = 304.0
|
||||
margin_bottom = 32.0
|
||||
margin_bottom = 52.062
|
||||
custom_constants/separation = 13
|
||||
alignment = 1
|
||||
|
||||
[node name="LeftColorPickerButton" type="ColorPickerButton" parent="VBoxContainer/ColorPickersHorizontal"]
|
||||
[node name="LeftColorPickerButton" type="ColorPickerButton" parent="ColorPickersHorizontal"]
|
||||
margin_left = 62.0
|
||||
margin_top = 6.0
|
||||
margin_right = 126.0
|
||||
margin_bottom = 32.0
|
||||
margin_bottom = 38.0
|
||||
rect_min_size = Vector2( 64, 32 )
|
||||
hint_tooltip = "Choose a color for the left tool"
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 4
|
||||
|
||||
[node name="ColorButtonsVertical" type="VBoxContainer" parent="VBoxContainer/ColorPickersHorizontal"]
|
||||
[node name="ColorButtonsVertical" type="VBoxContainer" parent="ColorPickersHorizontal"]
|
||||
margin_left = 139.0
|
||||
margin_right = 164.0
|
||||
margin_bottom = 32.0
|
||||
margin_bottom = 45.0
|
||||
alignment = 1
|
||||
|
||||
[node name="ColorSwitch" type="TextureButton" parent="VBoxContainer/ColorPickersHorizontal/ColorButtonsVertical" groups=["UIButtons"]]
|
||||
margin_top = 6.0
|
||||
[node name="ColorSwitch" type="TextureButton" parent="ColorPickersHorizontal/ColorButtonsVertical" groups=["UIButtons"]]
|
||||
margin_top = 13.0
|
||||
margin_right = 25.0
|
||||
margin_bottom = 13.0
|
||||
margin_bottom = 20.0
|
||||
hint_tooltip = "Switch left and right colors
|
||||
(%s)"
|
||||
mouse_default_cursor_shape = 2
|
||||
|
@ -54,18 +49,19 @@ shortcut_in_tooltip = false
|
|||
shortcut = SubResource( 19 )
|
||||
texture_normal = ExtResource( 2 )
|
||||
|
||||
[node name="ColorDefaults" type="TextureButton" parent="VBoxContainer/ColorPickersHorizontal/ColorButtonsVertical"]
|
||||
margin_top = 17.0
|
||||
[node name="ColorDefaults" type="TextureButton" parent="ColorPickersHorizontal/ColorButtonsVertical"]
|
||||
margin_top = 24.0
|
||||
margin_right = 25.0
|
||||
margin_bottom = 25.0
|
||||
margin_bottom = 32.0
|
||||
hint_tooltip = "Reset the colors to their default state (black for left, white for right)"
|
||||
mouse_default_cursor_shape = 2
|
||||
texture_normal = ExtResource( 1 )
|
||||
|
||||
[node name="RightColorPickerButton" type="ColorPickerButton" parent="VBoxContainer/ColorPickersHorizontal"]
|
||||
[node name="RightColorPickerButton" type="ColorPickerButton" parent="ColorPickersHorizontal"]
|
||||
margin_left = 177.0
|
||||
margin_top = 6.0
|
||||
margin_right = 241.0
|
||||
margin_bottom = 32.0
|
||||
margin_bottom = 38.0
|
||||
rect_min_size = Vector2( 64, 32 )
|
||||
hint_tooltip = "Choose a color for the right tool"
|
||||
mouse_default_cursor_shape = 2
|
||||
|
@ -73,66 +69,11 @@ size_flags_horizontal = 0
|
|||
size_flags_vertical = 4
|
||||
color = Color( 1, 1, 1, 1 )
|
||||
|
||||
[node name="Mirror" type="HBoxContainer" parent="VBoxContainer"]
|
||||
margin_top = 36.0
|
||||
margin_right = 304.0
|
||||
margin_bottom = 68.0
|
||||
custom_constants/separation = 44
|
||||
alignment = 1
|
||||
|
||||
[node name="Horizontal" type="Button" parent="VBoxContainer/Mirror" groups=["UIButtons"]]
|
||||
margin_left = 98.0
|
||||
margin_right = 130.0
|
||||
margin_bottom = 32.0
|
||||
rect_min_size = Vector2( 32, 32 )
|
||||
hint_tooltip = "Enable horizontal mirrored drawing"
|
||||
mouse_default_cursor_shape = 2
|
||||
toggle_mode = true
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/Mirror/Horizontal"]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -11.0
|
||||
margin_top = -11.0
|
||||
margin_right = 11.0
|
||||
margin_bottom = 11.0
|
||||
texture = ExtResource( 5 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Vertical" type="Button" parent="VBoxContainer/Mirror" groups=["UIButtons"]]
|
||||
margin_left = 174.0
|
||||
margin_right = 206.0
|
||||
margin_bottom = 32.0
|
||||
rect_min_size = Vector2( 32, 32 )
|
||||
hint_tooltip = "Enable vertical mirrored drawing"
|
||||
mouse_default_cursor_shape = 2
|
||||
toggle_mode = true
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/Mirror/Vertical"]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -11.0
|
||||
margin_top = -11.0
|
||||
margin_right = 11.0
|
||||
margin_bottom = 11.0
|
||||
texture = ExtResource( 4 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="color_changed" from="VBoxContainer/ColorPickersHorizontal/LeftColorPickerButton" to="." method="_on_ColorPickerButton_color_changed" binds= [ false ]]
|
||||
[connection signal="popup_closed" from="VBoxContainer/ColorPickersHorizontal/LeftColorPickerButton" to="." method="_on_ColorPickerButton_popup_closed"]
|
||||
[connection signal="pressed" from="VBoxContainer/ColorPickersHorizontal/LeftColorPickerButton" to="." method="_on_ColorPickerButton_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/ColorPickersHorizontal/ColorButtonsVertical/ColorSwitch" to="." method="_on_ColorSwitch_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/ColorPickersHorizontal/ColorButtonsVertical/ColorDefaults" to="." method="_on_ColorDefaults_pressed"]
|
||||
[connection signal="color_changed" from="VBoxContainer/ColorPickersHorizontal/RightColorPickerButton" to="." method="_on_ColorPickerButton_color_changed" binds= [ true ]]
|
||||
[connection signal="popup_closed" from="VBoxContainer/ColorPickersHorizontal/RightColorPickerButton" to="." method="_on_ColorPickerButton_popup_closed"]
|
||||
[connection signal="pressed" from="VBoxContainer/ColorPickersHorizontal/RightColorPickerButton" to="." method="_on_ColorPickerButton_pressed"]
|
||||
[connection signal="toggled" from="VBoxContainer/Mirror/Horizontal" to="." method="_on_Horizontal_toggled"]
|
||||
[connection signal="toggled" from="VBoxContainer/Mirror/Vertical" to="." method="_on_Vertical_toggled"]
|
||||
[connection signal="color_changed" from="ColorPickersHorizontal/LeftColorPickerButton" to="." method="_on_ColorPickerButton_color_changed" binds= [ false ]]
|
||||
[connection signal="popup_closed" from="ColorPickersHorizontal/LeftColorPickerButton" to="." method="_on_ColorPickerButton_popup_closed"]
|
||||
[connection signal="pressed" from="ColorPickersHorizontal/LeftColorPickerButton" to="." method="_on_ColorPickerButton_pressed"]
|
||||
[connection signal="pressed" from="ColorPickersHorizontal/ColorButtonsVertical/ColorSwitch" to="." method="_on_ColorSwitch_pressed"]
|
||||
[connection signal="pressed" from="ColorPickersHorizontal/ColorButtonsVertical/ColorDefaults" to="." method="_on_ColorDefaults_pressed"]
|
||||
[connection signal="color_changed" from="ColorPickersHorizontal/RightColorPickerButton" to="." method="_on_ColorPickerButton_color_changed" binds= [ true ]]
|
||||
[connection signal="popup_closed" from="ColorPickersHorizontal/RightColorPickerButton" to="." method="_on_ColorPickerButton_popup_closed"]
|
||||
[connection signal="pressed" from="ColorPickersHorizontal/RightColorPickerButton" to="." method="_on_ColorPickerButton_pressed"]
|
||||
|
|
55
src/UI/GlobalToolOptions.gd
Normal file
55
src/UI/GlobalToolOptions.gd
Normal file
|
@ -0,0 +1,55 @@
|
|||
extends PanelContainer
|
||||
|
||||
onready var grid_container: GridContainer = find_node("GridContainer")
|
||||
onready var horizontal_mirror: BaseButton = find_node("Horizontal")
|
||||
onready var vertical_mirror: BaseButton = find_node("Vertical")
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
# Resize tools panel when window gets resized
|
||||
get_tree().get_root().connect("size_changed", self, "_on_resized")
|
||||
|
||||
horizontal_mirror.pressed = Tools.horizontal_mirror
|
||||
vertical_mirror.pressed = Tools.vertical_mirror
|
||||
|
||||
|
||||
func _on_Horizontal_toggled(button_pressed: bool) -> void:
|
||||
Tools.horizontal_mirror = button_pressed
|
||||
Global.config_cache.set_value("preferences", "horizontal_mirror", button_pressed)
|
||||
Global.show_y_symmetry_axis = button_pressed
|
||||
Global.current_project.y_symmetry_axis.visible = (
|
||||
Global.show_y_symmetry_axis
|
||||
and Global.show_guides
|
||||
)
|
||||
|
||||
var texture_button: TextureRect = horizontal_mirror.get_node("TextureRect")
|
||||
var file_name := "horizontal_mirror_on.png"
|
||||
if !button_pressed:
|
||||
file_name = "horizontal_mirror_off.png"
|
||||
Global.change_button_texturerect(texture_button, file_name)
|
||||
|
||||
|
||||
func _on_Vertical_toggled(button_pressed: bool) -> void:
|
||||
Tools.vertical_mirror = button_pressed
|
||||
Global.config_cache.set_value("preferences", "vertical_mirror", button_pressed)
|
||||
Global.show_x_symmetry_axis = button_pressed
|
||||
# If the button is not pressed but another button is, keep the symmetry guide visible
|
||||
Global.current_project.x_symmetry_axis.visible = (
|
||||
Global.show_x_symmetry_axis
|
||||
and Global.show_guides
|
||||
)
|
||||
|
||||
var texture_button: TextureRect = vertical_mirror.get_node("TextureRect")
|
||||
var file_name := "vertical_mirror_on.png"
|
||||
if !button_pressed:
|
||||
file_name = "vertical_mirror_off.png"
|
||||
Global.change_button_texturerect(texture_button, file_name)
|
||||
|
||||
|
||||
func _on_resized() -> void:
|
||||
var tool_panel_size: Vector2 = rect_size
|
||||
var column_n = tool_panel_size.x / 36.5
|
||||
|
||||
if column_n < 1:
|
||||
column_n = 1
|
||||
grid_container.columns = column_n
|
73
src/UI/GlobalToolOptions.tscn
Normal file
73
src/UI/GlobalToolOptions.tscn
Normal file
|
@ -0,0 +1,73 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://assets/graphics/misc/horizontal_mirror_off.png" type="Texture" id=1]
|
||||
[ext_resource path="res://assets/graphics/misc/vertical_mirror_off.png" type="Texture" id=2]
|
||||
[ext_resource path="res://src/UI/GlobalToolOptions.gd" type="Script" id=3]
|
||||
|
||||
[node name="Global Tool Options" type="PanelContainer"]
|
||||
margin_left = 958.0
|
||||
margin_top = 228.0
|
||||
margin_right = 1276.0
|
||||
margin_bottom = 274.0
|
||||
rect_min_size = Vector2( 0, 36 )
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="."]
|
||||
margin_left = 7.0
|
||||
margin_top = 7.0
|
||||
margin_right = 311.0
|
||||
margin_bottom = 39.0
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="ScrollContainer"]
|
||||
margin_right = 68.0
|
||||
margin_bottom = 32.0
|
||||
columns = 3
|
||||
|
||||
[node name="Horizontal" type="Button" parent="ScrollContainer/GridContainer" groups=["UIButtons"]]
|
||||
margin_right = 32.0
|
||||
margin_bottom = 32.0
|
||||
rect_min_size = Vector2( 32, 32 )
|
||||
hint_tooltip = "Enable horizontal mirrored drawing"
|
||||
mouse_default_cursor_shape = 2
|
||||
toggle_mode = true
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/GridContainer/Horizontal"]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -11.0
|
||||
margin_top = -11.0
|
||||
margin_right = 11.0
|
||||
margin_bottom = 11.0
|
||||
texture = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Vertical" type="Button" parent="ScrollContainer/GridContainer" groups=["UIButtons"]]
|
||||
margin_left = 36.0
|
||||
margin_right = 68.0
|
||||
margin_bottom = 32.0
|
||||
rect_min_size = Vector2( 32, 32 )
|
||||
hint_tooltip = "Enable vertical mirrored drawing"
|
||||
mouse_default_cursor_shape = 2
|
||||
toggle_mode = true
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/GridContainer/Vertical"]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -11.0
|
||||
margin_top = -11.0
|
||||
margin_right = 11.0
|
||||
margin_bottom = 11.0
|
||||
texture = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="resized" from="." to="." method="_on_resized"]
|
||||
[connection signal="toggled" from="ScrollContainer/GridContainer/Horizontal" to="." method="_on_Horizontal_toggled"]
|
||||
[connection signal="toggled" from="ScrollContainer/GridContainer/Vertical" to="." method="_on_Vertical_toggled"]
|
|
@ -10,9 +10,6 @@ margin_bottom = -230.0
|
|||
rect_min_size = Vector2( 36, 0 )
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="."]
|
||||
margin_right = 14.0
|
||||
|
|
|
@ -551,10 +551,13 @@ func _toggle_show_guides() -> void:
|
|||
|
||||
|
||||
func _toggle_zen_mode() -> void:
|
||||
var color_pickers: Container = Global.control.find_node("Color Pickers")
|
||||
var global_tool_options: Container = Global.control.find_node("Global Tool Options")
|
||||
ui.set_control_hidden(Global.animation_timeline, !zen_mode)
|
||||
ui.set_control_hidden(Global.tool_panel, !zen_mode)
|
||||
ui.set_control_hidden(Global.canvas_preview_container, !zen_mode)
|
||||
ui.set_control_hidden(Global.color_pickers, !zen_mode)
|
||||
ui.set_control_hidden(color_pickers, !zen_mode)
|
||||
ui.set_control_hidden(global_tool_options, !zen_mode)
|
||||
ui.set_control_hidden(Global.left_tool_options_scroll, !zen_mode)
|
||||
ui.set_control_hidden(Global.right_tool_options_scroll, !zen_mode)
|
||||
ui.set_control_hidden(Global.palette_panel, !zen_mode)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=44 format=2]
|
||||
[gd_scene load_steps=47 format=2]
|
||||
|
||||
[ext_resource path="res://src/UI/Tools.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://src/UI/Canvas/CanvasPreview.tscn" type="PackedScene" id=2]
|
||||
|
@ -9,6 +9,7 @@
|
|||
[ext_resource path="res://src/UI/Canvas/CameraMovement.gd" type="Script" id=7]
|
||||
[ext_resource path="res://src/Shaders/Greyscale.gdshader" type="Shader" id=8]
|
||||
[ext_resource path="res://src/Shaders/TransparentChecker.shader" type="Shader" id=9]
|
||||
[ext_resource path="res://src/UI/GlobalToolOptions.tscn" type="PackedScene" id=10]
|
||||
[ext_resource path="res://addons/dockable_container/layout.gd" type="Script" id=14]
|
||||
[ext_resource path="res://src/UI/CanvasPreviewContainer.tscn" type="PackedScene" id=16]
|
||||
[ext_resource path="res://src/UI/ColorPickers.tscn" type="PackedScene" id=17]
|
||||
|
@ -81,13 +82,27 @@ script = ExtResource( 36 )
|
|||
names = PoolStringArray( "Color Pickers" )
|
||||
current_tab = 0
|
||||
|
||||
[sub_resource type="Resource" id=30]
|
||||
resource_name = "Tabs"
|
||||
script = ExtResource( 36 )
|
||||
names = PoolStringArray( "Global Tool Options" )
|
||||
current_tab = 0
|
||||
|
||||
[sub_resource type="Resource" id=31]
|
||||
resource_name = "Split"
|
||||
script = ExtResource( 27 )
|
||||
direction = 1
|
||||
percent = 0.5
|
||||
first = SubResource( 20 )
|
||||
second = SubResource( 30 )
|
||||
|
||||
[sub_resource type="Resource" id=21]
|
||||
resource_name = "Split"
|
||||
script = ExtResource( 27 )
|
||||
direction = 1
|
||||
percent = 0.911765
|
||||
first = SubResource( 11 )
|
||||
second = SubResource( 20 )
|
||||
second = SubResource( 31 )
|
||||
|
||||
[sub_resource type="Resource" id=22]
|
||||
resource_name = "Tabs"
|
||||
|
@ -143,11 +158,11 @@ second = SubResource( 15 )
|
|||
resource_name = "Split"
|
||||
script = ExtResource( 27 )
|
||||
direction = 0
|
||||
percent = 0.0134804
|
||||
percent = 0.0
|
||||
first = SubResource( 1 )
|
||||
second = SubResource( 16 )
|
||||
|
||||
[sub_resource type="Resource" id=30]
|
||||
[sub_resource type="Resource" id=32]
|
||||
resource_name = "Layout"
|
||||
script = ExtResource( 14 )
|
||||
root = SubResource( 5 )
|
||||
|
@ -189,9 +204,6 @@ anchor_bottom = 1.0
|
|||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
script = ExtResource( 37 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="DockableContainer" type="Container" parent="."]
|
||||
anchor_right = 1.0
|
||||
|
@ -199,11 +211,8 @@ anchor_bottom = 1.0
|
|||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
script = ExtResource( 35 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
tabs_visible = false
|
||||
layout = SubResource( 30 )
|
||||
layout = SubResource( 32 )
|
||||
|
||||
[node name="Tools" parent="DockableContainer" instance=ExtResource( 1 )]
|
||||
margin_left = 4.0
|
||||
|
@ -333,10 +342,15 @@ margin_bottom = 716.0
|
|||
margin_left = 958.0
|
||||
margin_top = 8.0
|
||||
margin_right = 1276.0
|
||||
margin_bottom = 173.062
|
||||
margin_bottom = 99.0623
|
||||
|
||||
[node name="Color Pickers" parent="DockableContainer" instance=ExtResource( 17 )]
|
||||
margin_top = 197.062
|
||||
margin_top = 123.062
|
||||
margin_bottom = 169.062
|
||||
|
||||
[node name="Global Tool Options" parent="DockableContainer" instance=ExtResource( 10 )]
|
||||
margin_top = 193.062
|
||||
margin_bottom = 229.062
|
||||
|
||||
[node name="Left Tool Options" type="ScrollContainer" parent="DockableContainer"]
|
||||
margin_left = 958.0
|
||||
|
|
Loading…
Reference in a new issue