mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-05-05 12:24:48 -04:00
Improve canvas preview UI
This commit is contained in:
parent
edf7e43bb8
commit
6157fd3355
4 changed files with 40 additions and 50 deletions
|
@ -184,8 +184,6 @@ margin_left = 7.0
|
||||||
margin_top = 7.0
|
margin_top = 7.0
|
||||||
margin_right = 507.0
|
margin_right = 507.0
|
||||||
margin_bottom = 307.0
|
margin_bottom = 307.0
|
||||||
current_dir = "/home/luiq/data/libDev/git/Pixelorama"
|
|
||||||
current_path = "/home/luiq/data/libDev/git/Pixelorama/"
|
|
||||||
|
|
||||||
[node name="EditPalettePopup" parent="." instance=ExtResource( 7 )]
|
[node name="EditPalettePopup" parent="." instance=ExtResource( 7 )]
|
||||||
margin_left = 7.0
|
margin_left = 7.0
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
extends HBoxContainer
|
extends PanelContainer
|
||||||
|
|
||||||
|
|
||||||
onready var canvas_preview = $PreviewContainer/PreviewViewportContainer/Viewport/CanvasPreview
|
onready var canvas_preview = $HBoxContainer/PreviewViewportContainer/Viewport/CanvasPreview
|
||||||
onready var camera : Camera2D = $PreviewContainer/PreviewViewportContainer/Viewport/CameraPreview
|
onready var camera : Camera2D = $HBoxContainer/PreviewViewportContainer/Viewport/CameraPreview
|
||||||
onready var play_button : Button = $SettingsContainer/VBoxContainer/PlayButton
|
onready var play_button : Button = $HBoxContainer/VBoxContainer/PlayButton
|
||||||
|
|
||||||
|
|
||||||
func _on_PreviewZoomSlider_value_changed(value : float) -> void:
|
func _on_PreviewZoomSlider_value_changed(value : float) -> void:
|
||||||
|
|
|
@ -18,47 +18,54 @@ shader_param/rect_size = Vector2( 0, 0 )
|
||||||
shader_param/follow_movement = false
|
shader_param/follow_movement = false
|
||||||
shader_param/follow_scale = false
|
shader_param/follow_scale = false
|
||||||
|
|
||||||
[node name="CanvasPreviewContainer" type="HBoxContainer"]
|
[node name="CanvasPreviewContainer" type="PanelContainer"]
|
||||||
margin_right = 332.0
|
margin_right = 278.0
|
||||||
margin_bottom = 164.0
|
margin_bottom = 164.0
|
||||||
|
rect_min_size = Vector2( 300, 0 )
|
||||||
size_flags_horizontal = 4
|
size_flags_horizontal = 4
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="SettingsContainer" type="PanelContainer" parent="."]
|
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||||
margin_right = 34.0
|
|
||||||
margin_bottom = 164.0
|
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="SettingsContainer"]
|
|
||||||
margin_left = 7.0
|
margin_left = 7.0
|
||||||
margin_top = 7.0
|
margin_top = 7.0
|
||||||
margin_right = 27.0
|
margin_right = 293.0
|
||||||
margin_bottom = 157.0
|
margin_bottom = 157.0
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="SettingsContainer/VBoxContainer"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
|
||||||
margin_right = 20.0
|
margin_right = 20.0
|
||||||
|
margin_bottom = 150.0
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="HBoxContainer/VBoxContainer"]
|
||||||
|
margin_left = 6.0
|
||||||
|
margin_right = 14.0
|
||||||
margin_bottom = 14.0
|
margin_bottom = 14.0
|
||||||
|
size_flags_horizontal = 4
|
||||||
text = "+"
|
text = "+"
|
||||||
align = 1
|
align = 1
|
||||||
|
|
||||||
[node name="PreviewZoomSlider" type="VSlider" parent="SettingsContainer/VBoxContainer"]
|
[node name="PreviewZoomSlider" type="VSlider" parent="HBoxContainer/VBoxContainer"]
|
||||||
|
margin_left = 2.0
|
||||||
margin_top = 18.0
|
margin_top = 18.0
|
||||||
margin_right = 16.0
|
margin_right = 18.0
|
||||||
margin_bottom = 108.0
|
margin_bottom = 108.0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
step = 0.01
|
step = 0.01
|
||||||
|
|
||||||
[node name="Label2" type="Label" parent="SettingsContainer/VBoxContainer"]
|
[node name="Label2" type="Label" parent="HBoxContainer/VBoxContainer"]
|
||||||
|
margin_left = 7.0
|
||||||
margin_top = 112.0
|
margin_top = 112.0
|
||||||
margin_right = 20.0
|
margin_right = 12.0
|
||||||
margin_bottom = 126.0
|
margin_bottom = 126.0
|
||||||
|
size_flags_horizontal = 4
|
||||||
text = "-"
|
text = "-"
|
||||||
align = 1
|
align = 1
|
||||||
|
|
||||||
[node name="PlayButton" type="Button" parent="SettingsContainer/VBoxContainer" groups=[
|
[node name="PlayButton" type="Button" parent="HBoxContainer/VBoxContainer" groups=[
|
||||||
"UIButtons",
|
"UIButtons",
|
||||||
]]
|
]]
|
||||||
margin_top = 130.0
|
margin_top = 130.0
|
||||||
|
@ -68,7 +75,7 @@ rect_min_size = Vector2( 20, 0 )
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
toggle_mode = true
|
toggle_mode = true
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="SettingsContainer/VBoxContainer/PlayButton"]
|
[node name="TextureRect" type="TextureRect" parent="HBoxContainer/VBoxContainer/PlayButton"]
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
|
@ -83,39 +90,25 @@ __meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="PreviewContainer" type="PanelContainer" parent="."]
|
[node name="PreviewViewportContainer" type="ViewportContainer" parent="HBoxContainer"]
|
||||||
margin_left = 38.0
|
margin_left = 24.0
|
||||||
margin_right = 332.0
|
margin_right = 284.0
|
||||||
margin_bottom = 164.0
|
margin_bottom = 150.0
|
||||||
size_flags_horizontal = 4
|
|
||||||
|
|
||||||
[node name="PreviewViewportContainer" type="ViewportContainer" parent="PreviewContainer"]
|
|
||||||
margin_left = 7.0
|
|
||||||
margin_top = 7.0
|
|
||||||
margin_right = 287.0
|
|
||||||
margin_bottom = 157.0
|
|
||||||
rect_min_size = Vector2( 0, 150 )
|
rect_min_size = Vector2( 0, 150 )
|
||||||
|
|
||||||
[node name="Viewport" type="Viewport" parent="PreviewContainer/PreviewViewportContainer"]
|
[node name="Viewport" type="Viewport" parent="HBoxContainer/PreviewViewportContainer"]
|
||||||
size = Vector2( 280, 150 )
|
size = Vector2( 260, 150 )
|
||||||
transparent_bg = true
|
transparent_bg = true
|
||||||
handle_input_locally = false
|
handle_input_locally = false
|
||||||
render_target_update_mode = 3
|
render_target_update_mode = 3
|
||||||
|
|
||||||
[node name="TransparentChecker" parent="PreviewContainer/PreviewViewportContainer/Viewport" instance=ExtResource( 2 )]
|
[node name="TransparentChecker" parent="HBoxContainer/PreviewViewportContainer/Viewport" instance=ExtResource( 2 )]
|
||||||
material = SubResource( 1 )
|
material = SubResource( 1 )
|
||||||
|
|
||||||
[node name="CanvasPreview" parent="PreviewContainer/PreviewViewportContainer/Viewport" instance=ExtResource( 1 )]
|
[node name="CanvasPreview" parent="HBoxContainer/PreviewViewportContainer/Viewport" instance=ExtResource( 1 )]
|
||||||
|
|
||||||
[node name="CameraPreview" type="Camera2D" parent="PreviewContainer/PreviewViewportContainer/Viewport"]
|
[node name="CameraPreview" type="Camera2D" parent="HBoxContainer/PreviewViewportContainer/Viewport"]
|
||||||
offset = Vector2( 32, 32 )
|
offset = Vector2( 32, 32 )
|
||||||
current = true
|
current = true
|
||||||
zoom = Vector2( 0.15, 0.15 )
|
zoom = Vector2( 0.15, 0.15 )
|
||||||
script = ExtResource( 4 )
|
script = ExtResource( 4 )
|
||||||
|
|
||||||
[node name="Panel" type="Panel" parent="."]
|
|
||||||
margin_left = 336.0
|
|
||||||
margin_right = 336.0
|
|
||||||
margin_bottom = 164.0
|
|
||||||
[connection signal="value_changed" from="SettingsContainer/VBoxContainer/PreviewZoomSlider" to="." method="_on_PreviewZoomSlider_value_changed"]
|
|
||||||
[connection signal="toggled" from="SettingsContainer/VBoxContainer/PlayButton" to="." method="_on_PlayButton_toggled"]
|
|
||||||
|
|
|
@ -34,7 +34,8 @@ size_flags_horizontal = 3
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
custom_constants/separation = 0
|
custom_constants/separation = 0
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false,
|
||||||
|
"_edit_vertical_guides_": [ ]
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="ToolPanel" type="Panel" parent="."]
|
[node name="ToolPanel" type="Panel" parent="."]
|
||||||
|
@ -332,23 +333,21 @@ __meta__ = {
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="CanvasPreviewContainer" parent="RightPanel/PreviewAndPalettes" instance=ExtResource( 16 )]
|
[node name="CanvasPreviewContainer" parent="RightPanel/PreviewAndPalettes" instance=ExtResource( 16 )]
|
||||||
margin_right = 336.0
|
margin_left = 15.0
|
||||||
|
margin_right = 315.0
|
||||||
|
|
||||||
[node name="ToolAndPaletteVSplit" type="VSplitContainer" parent="RightPanel/PreviewAndPalettes"]
|
[node name="ToolAndPaletteVSplit" type="VSplitContainer" parent="RightPanel/PreviewAndPalettes"]
|
||||||
margin_top = 168.0
|
margin_top = 168.0
|
||||||
margin_right = 336.0
|
margin_right = 330.0
|
||||||
margin_bottom = 676.0
|
margin_bottom = 676.0
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
custom_constants/autohide = 0
|
custom_constants/autohide = 0
|
||||||
|
|
||||||
[node name="ColorAndToolOptions" parent="RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit" instance=ExtResource( 17 )]
|
[node name="ColorAndToolOptions" parent="RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit" instance=ExtResource( 17 )]
|
||||||
margin_right = 336.0
|
|
||||||
margin_bottom = 248.0
|
margin_bottom = 248.0
|
||||||
|
|
||||||
[node name="PalettePanelContainer" parent="RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit" instance=ExtResource( 20 )]
|
[node name="PalettePanelContainer" parent="RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit" instance=ExtResource( 20 )]
|
||||||
margin_left = 18.0
|
|
||||||
margin_top = 260.0
|
margin_top = 260.0
|
||||||
margin_right = 318.0
|
|
||||||
margin_bottom = 508.0
|
margin_bottom = 508.0
|
||||||
[connection signal="reposition_active_tab_request" from="CanvasAndTimeline/ViewportAndRulers/TabsContainer/Tabs" to="CanvasAndTimeline/ViewportAndRulers/TabsContainer/Tabs" method="_on_Tabs_reposition_active_tab_request"]
|
[connection signal="reposition_active_tab_request" from="CanvasAndTimeline/ViewportAndRulers/TabsContainer/Tabs" to="CanvasAndTimeline/ViewportAndRulers/TabsContainer/Tabs" method="_on_Tabs_reposition_active_tab_request"]
|
||||||
[connection signal="tab_changed" from="CanvasAndTimeline/ViewportAndRulers/TabsContainer/Tabs" to="CanvasAndTimeline/ViewportAndRulers/TabsContainer/Tabs" method="_on_Tabs_tab_changed"]
|
[connection signal="tab_changed" from="CanvasAndTimeline/ViewportAndRulers/TabsContainer/Tabs" to="CanvasAndTimeline/ViewportAndRulers/TabsContainer/Tabs" method="_on_Tabs_tab_changed"]
|
||||||
|
|
Loading…
Add table
Reference in a new issue