From d48610d5b828ff67ce5b30afba2cc2a1e656dcad Mon Sep 17 00:00:00 2001 From: Ed94 Date: Thu, 14 Jul 2022 17:45:24 -0400 Subject: [PATCH] ui changes. --- App/RDP/RDP_Viewer.tscn | 56 ++++++++++++++++++++++---------- App/RDP/Readme.md | 2 +- App/RDP/Scripts/RDP_Viewer.gd | 4 +-- App/Scenes/CourseDirectory.tscn | 39 ++++++++++++---------- App/{ => Scenes}/Persistent.tscn | 0 App/project.godot | 2 +- 6 files changed, 64 insertions(+), 39 deletions(-) rename App/{ => Scenes}/Persistent.tscn (100%) diff --git a/App/RDP/RDP_Viewer.tscn b/App/RDP/RDP_Viewer.tscn index 5f1b2b5..899be0e 100644 --- a/App/RDP/RDP_Viewer.tscn +++ b/App/RDP/RDP_Viewer.tscn @@ -7,20 +7,26 @@ [node name="RDP_Panel" type="Panel"] anchor_right = 1.0 anchor_bottom = 1.0 +margin_left = -9.0 +margin_top = 1.0 +margin_right = -9.0 +margin_bottom = 1.0 script = ExtResource( 3 ) [node name="CourseBrand" type="TextureRect" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 -rect_scale = Vector2( 0.25, 0.25 ) +rect_scale = Vector2( 0.2, 0.2 ) texture = ExtResource( 2 ) expand = true stretch_mode = 6 [node name="Tokens_TOut" type="TextEdit" parent="."] -anchor_left = 0.25 -anchor_right = 0.5 +anchor_left = 0.2 +anchor_right = 0.465 anchor_bottom = 1.0 +margin_left = 1.2 +margin_right = -0.136017 grow_horizontal = 0 theme = ExtResource( 1 ) readonly = true @@ -28,9 +34,10 @@ highlight_current_line = true show_line_numbers = true [node name="AST_TOut" type="TextEdit" parent="."] -anchor_left = 0.5 +anchor_left = 0.465 anchor_right = 1.0 anchor_bottom = 1.0 +margin_left = 1.83997 grow_horizontal = 0 theme = ExtResource( 1 ) readonly = true @@ -51,20 +58,33 @@ window_title = "Open a File" mode = 0 access = 2 -[node name="ParseLetterFile_Btn" type="Button" parent="."] -anchor_top = 0.25 -anchor_right = 0.247 -anchor_bottom = 0.274 -margin_left = 2.0 -margin_right = 0.071991 -margin_bottom = 14.6 +[node name="VBox" type="VBoxContainer" parent="."] +anchor_top = 0.196 +anchor_right = 0.2 +anchor_bottom = 1.0 +margin_top = 2.39999 +margin_right = -1.8 +margin_bottom = -2.0 + +[node name="ParseLetterFile_Btn" type="Button" parent="VBox"] +margin_right = 203.0 +margin_bottom = 32.0 +focus_neighbour_top = NodePath("../../CourseBrand") +size_flags_vertical = 3 +size_flags_stretch_ratio = 0.08 text = "Parse a letter file" -[node name="Back_Btn" type="Button" parent="."] -anchor_top = 0.95 -anchor_right = 0.247 -anchor_bottom = 0.992 -margin_left = 2.0 -margin_right = 0.071991 -margin_bottom = 2.59998 +[node name="Separator" type="HSeparator" parent="VBox"] +modulate = Color( 0.145098, 0.145098, 0.164706, 0 ) +margin_top = 36.0 +margin_right = 203.0 +margin_bottom = 441.0 +size_flags_vertical = 15 + +[node name="Back_Btn" type="Button" parent="VBox"] +margin_top = 445.0 +margin_right = 203.0 +margin_bottom = 478.0 +size_flags_vertical = 3 +size_flags_stretch_ratio = 0.08 text = "Course Directory" diff --git a/App/RDP/Readme.md b/App/RDP/Readme.md index 6d799d5..42b3a28 100644 --- a/App/RDP/Readme.md +++ b/App/RDP/Readme.md @@ -1,6 +1,6 @@ # Building a parser from scratch -[Img](https://i.imgur.com/rEzWwGs.png) +![Img](https://i.imgur.com/rEzWwGs.png) ## Lecutres diff --git a/App/RDP/Scripts/RDP_Viewer.gd b/App/RDP/Scripts/RDP_Viewer.gd index c03146c..5eb1173 100644 --- a/App/RDP/Scripts/RDP_Viewer.gd +++ b/App/RDP/Scripts/RDP_Viewer.gd @@ -8,8 +8,8 @@ var Parser = preload("Parser.gd").new() onready var Tokens_TOut = get_node("Tokens_TOut") onready var AST_TOut = get_node("AST_TOut") onready var FDialog = get_node("Letter_FDialog") -onready var FD_Btn = get_node("ParseLetterFile_Btn") -onready var Back_Btn = get_node("Back_Btn") +onready var FD_Btn = get_node("VBox/ParseLetterFile_Btn") +onready var Back_Btn = get_node("VBox/Back_Btn") func tokens_out(text): diff --git a/App/Scenes/CourseDirectory.tscn b/App/Scenes/CourseDirectory.tscn index a442f1c..53e9814 100644 --- a/App/Scenes/CourseDirectory.tscn +++ b/App/Scenes/CourseDirectory.tscn @@ -11,38 +11,43 @@ anchor_bottom = 1.0 script = ExtResource( 1 ) [node name="HBox" type="HBoxContainer" parent="."] -anchor_left = 0.15 -anchor_top = 0.25 -anchor_right = 0.85 -anchor_bottom = 0.75 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -452.0 +margin_top = -125.5 +margin_right = 452.0 +margin_bottom = 125.5 +size_flags_horizontal = 3 +size_flags_vertical = 3 alignment = 1 [node name="RDP_Btn" type="Button" parent="HBox"] -margin_left = 84.0 -margin_right = 339.0 -margin_bottom = 150.0 +margin_right = 433.0 +margin_bottom = 251.0 rect_min_size = Vector2( 255, 150 ) -size_flags_horizontal = 0 -size_flags_vertical = 0 +size_flags_horizontal = 3 +size_flags_vertical = 7 theme = ExtResource( 4 ) icon = ExtResource( 2 ) icon_align = 1 expand_icon = true [node name="VSeparator" type="VSeparator" parent="HBox"] -margin_left = 343.0 -margin_right = 373.0 -margin_bottom = 300.0 +margin_left = 437.0 +margin_right = 467.0 +margin_bottom = 251.0 theme = ExtResource( 4 ) custom_constants/separation = 30 [node name="RegM_Btn" type="Button" parent="HBox"] -margin_left = 377.0 -margin_right = 632.0 -margin_bottom = 150.0 +margin_left = 471.0 +margin_right = 904.0 +margin_bottom = 251.0 rect_min_size = Vector2( 255, 150 ) -size_flags_horizontal = 0 -size_flags_vertical = 0 +size_flags_horizontal = 3 +size_flags_vertical = 3 theme = ExtResource( 4 ) icon = ExtResource( 3 ) icon_align = 1 diff --git a/App/Persistent.tscn b/App/Scenes/Persistent.tscn similarity index 100% rename from App/Persistent.tscn rename to App/Scenes/Persistent.tscn diff --git a/App/project.godot b/App/project.godot index aea8988..65f57e5 100644 --- a/App/project.godot +++ b/App/project.godot @@ -21,7 +21,7 @@ _global_script_class_icons={ [application] config/name="Parser" -run/main_scene="res://Persistent.tscn" +run/main_scene="res://Scenes/Persistent.tscn" config/icon="res://Assets/Branding/RDP_Class_cover_small.png" [autoload]