Skip to content

Commit

Permalink
added blinking block animation,
Browse files Browse the repository at this point in the history
major viewport  and window refactoring: desktop app (for now),
new max and min zoom
  • Loading branch information
BlankManifold committed Nov 2, 2022
1 parent 316dfa2 commit 12b6c27
Show file tree
Hide file tree
Showing 9 changed files with 457 additions and 314 deletions.
8 changes: 2 additions & 6 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,8 @@ config/icon="res://rect13311B.png"

[display]

window/size/width=1080
window/size/height=1920
window/dpi/allow_hidpi=true
window/handheld/orientation="portrait"
window/stretch/mode="2d"
window/stretch/aspect="expand"
window/size/width=1920
window/size/height=1080

[global]

Expand Down
51 changes: 20 additions & 31 deletions scenes/MainControl.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,26 @@
[ext_resource path="res://scripts/MainControl.cs" type="Script" id=4]

[node name="MainControl" type="Control"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -540.0
margin_top = -960.0
margin_right = 540.0
margin_bottom = 960.0
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 4 )

[node name="CanvasLayer" type="CanvasLayer" parent="."]

[node name="ToolsUI" parent="CanvasLayer" instance=ExtResource( 1 )]
unique_name_in_owner = true
[node name="CanvasLayer2" type="CanvasLayer" parent="."]
follow_viewport_enable = true

[node name="PreviewViewportContainer" type="ViewportContainer" parent="."]
[node name="PreviewViewportContainer" type="ViewportContainer" parent="CanvasLayer2"]
unique_name_in_owner = true
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -1080.0
margin_top = -968.0
margin_right = 1080.0
margin_bottom = 1192.0
rect_min_size = Vector2( 400, 400 )
margin_left = -1034.0
margin_top = -1080.0
margin_right = 1126.0
margin_bottom = 1080.0
rect_min_size = Vector2( 1080, 1080 )

[node name="PreviewViewport" type="Viewport" parent="PreviewViewportContainer"]
[node name="PreviewViewport" type="Viewport" parent="CanvasLayer2/PreviewViewportContainer"]
unique_name_in_owner = true
size = Vector2( 2160, 2160 )
transparent_bg = true
Expand All @@ -44,18 +36,15 @@ usage = 0
render_target_update_mode = 3
gui_disable_input = true

[node name="PreviewUI" parent="PreviewViewportContainer/PreviewViewport" instance=ExtResource( 2 )]
[node name="PreviewUI" parent="CanvasLayer2/PreviewViewportContainer/PreviewViewport" instance=ExtResource( 2 )]
unique_name_in_owner = true
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 0.0
margin_top = 0.0
margin_right = 2160.0
margin_bottom = 2160.0

[node name="Camera2D" type="Camera2D" parent="."]
rect_pivot_offset = Vector2( 1080, 1080 )

[node name="Camera2D" type="Camera2D" parent="CanvasLayer2/PreviewViewportContainer/PreviewViewport/PreviewUI"]
unique_name_in_owner = true
position = Vector2( 540, 960 )
current = true

[node name="CanvasLayer" type="CanvasLayer" parent="."]

[node name="ToolsUI" parent="CanvasLayer" instance=ExtResource( 1 )]
unique_name_in_owner = true
33 changes: 27 additions & 6 deletions scenes/PreviewUI.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=3 format=2]
[gd_scene load_steps=4 format=2]

[ext_resource path="res://scripts/PreviewUI.cs" type="Script" id=2]

Expand All @@ -7,15 +7,32 @@ size = 34
use_mipmaps = true
use_filter = true

[sub_resource type="Animation" id=2]
resource_name = "BlinkingBlock"
loop = true
tracks/0/type = "method"
tracks/0/path = NodePath(".")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 1, 1 ),
"values": [ {
"args": [ false ],
"method": "UpdateOnlyBlock"
}, {
"args": [ true ],
"method": "UpdateOnlyBlock"
} ]
}

[node name="PreviewUI" type="Control"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -540.0
margin_top = -540.0
margin_right = 540.0
margin_bottom = 540.0
mouse_filter = 2
script = ExtResource( 2 )

Expand All @@ -29,7 +46,7 @@ margin_left = -540.0
margin_top = -540.0
margin_right = 540.0
margin_bottom = 540.0
rect_pivot_offset = Vector2( 1080, 1080 )
rect_pivot_offset = Vector2( 540, 540 )

[node name="Text" type="RichTextLabel" parent="BackgroundRect"]
unique_name_in_owner = true
Expand All @@ -44,3 +61,7 @@ bbcode_enabled = true
meta_underlined = false
scroll_active = false
override_selected_font_color = true

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
unique_name_in_owner = true
anims/BlinkingBlock = SubResource( 2 )
2 changes: 2 additions & 0 deletions scenes/SpacingContainer.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
margin_right = 152.0
margin_bottom = 65.0
rect_scale = Vector2( 1, 1.01406 )
size_flags_horizontal = 0
size_flags_vertical = 0
custom_constants/separation = 5
script = ExtResource( 1 )

Expand Down
Loading

0 comments on commit 12b6c27

Please sign in to comment.