Improve UI with application name & version and better spacing
This commit is contained in:
parent
5e0f790b43
commit
279f441af1
2 changed files with 53 additions and 15 deletions
|
@ -1,9 +1,10 @@
|
|||
[gd_scene load_steps=9 format=3 uid="uid://bjah7k4bxo044"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://bjah7k4bxo044"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/Main.gd" id="1_2625y"]
|
||||
[ext_resource type="Script" path="res://src/ImageViewport.gd" id="2_hvo65"]
|
||||
[ext_resource type="Script" path="res://src/ImageViewportDisplays.gd" id="3_n4itb"]
|
||||
[ext_resource type="Shader" path="res://src/ui_background.gdshader" id="4_ty3qx"]
|
||||
[ext_resource type="Script" path="res://src/UIAppVersion.gd" id="5_o1ggv"]
|
||||
[ext_resource type="Script" path="res://src/Editor.gd" id="7_g8bap"]
|
||||
[ext_resource type="Script" path="res://src/Camera.gd" id="8_mls06"]
|
||||
|
||||
|
@ -58,6 +59,29 @@ grow_vertical = 2
|
|||
focus_mode = 2
|
||||
color = Color(1, 1, 1, 0)
|
||||
|
||||
[node name="AppName" type="Label" parent="UI_Layer/UserInterfaceContainer"]
|
||||
layout_mode = 0
|
||||
offset_left = 24.0
|
||||
offset_top = 24.0
|
||||
offset_right = 208.0
|
||||
offset_bottom = 56.0
|
||||
theme_override_font_sizes/font_size = 20
|
||||
text = "GlitchApp
|
||||
"
|
||||
vertical_alignment = 2
|
||||
|
||||
[node name="AppVersion" type="Label" parent="UI_Layer/UserInterfaceContainer"]
|
||||
layout_mode = 0
|
||||
offset_left = 128.0
|
||||
offset_top = 24.0
|
||||
offset_right = 208.0
|
||||
offset_bottom = 56.0
|
||||
theme_override_font_sizes/font_size = 14
|
||||
text = "v0
|
||||
"
|
||||
vertical_alignment = 2
|
||||
script = ExtResource("5_o1ggv")
|
||||
|
||||
[node name="OpenImageDialog" type="FileDialog" parent="UI_Layer/UserInterfaceContainer"]
|
||||
title = "Load Image"
|
||||
size = Vector2i(521, 159)
|
||||
|
@ -75,27 +99,39 @@ filters = PackedStringArray("*.png")
|
|||
use_native_dialog = true
|
||||
|
||||
[node name="OpenImageButton" type="Button" parent="UI_Layer/UserInterfaceContainer"]
|
||||
layout_mode = 0
|
||||
offset_left = 24.0
|
||||
layout_mode = 1
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -360.0
|
||||
offset_top = 24.0
|
||||
offset_right = 136.0
|
||||
offset_right = -248.0
|
||||
offset_bottom = 56.0
|
||||
grow_horizontal = 0
|
||||
text = "Load Image"
|
||||
|
||||
[node name="SaveImageButton" type="Button" parent="UI_Layer/UserInterfaceContainer"]
|
||||
layout_mode = 0
|
||||
offset_left = 144.0
|
||||
offset_top = 24.0
|
||||
offset_right = 264.0
|
||||
offset_bottom = 56.0
|
||||
layout_mode = 1
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -240.0
|
||||
offset_top = 23.0
|
||||
offset_right = -120.0
|
||||
offset_bottom = 55.0
|
||||
grow_horizontal = 0
|
||||
text = "Export Image"
|
||||
|
||||
[node name="FitImageButton" type="Button" parent="UI_Layer/UserInterfaceContainer"]
|
||||
layout_mode = 1
|
||||
offset_left = 272.0
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -112.0
|
||||
offset_top = 24.0
|
||||
offset_right = 360.0
|
||||
offset_right = -24.0
|
||||
offset_bottom = 56.0
|
||||
grow_horizontal = 0
|
||||
text = "Fit Image"
|
||||
|
||||
[node name="Editor" type="Control" parent="UI_Layer/UserInterfaceContainer"]
|
||||
|
@ -130,18 +166,16 @@ use_native_dialog = true
|
|||
|
||||
[node name="Label" type="Label" parent="UI_Layer/UserInterfaceContainer/Editor"]
|
||||
layout_mode = 0
|
||||
offset_top = 8.0
|
||||
offset_right = 104.0
|
||||
offset_bottom = 40.0
|
||||
offset_bottom = 32.0
|
||||
text = "Load Preset: "
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="PresetOptions" type="OptionButton" parent="UI_Layer/UserInterfaceContainer/Editor"]
|
||||
layout_mode = 0
|
||||
offset_left = 104.0
|
||||
offset_top = 8.0
|
||||
offset_right = 240.0
|
||||
offset_bottom = 40.0
|
||||
offset_bottom = 32.0
|
||||
|
||||
[node name="CodeEdit" type="CodeEdit" parent="UI_Layer/UserInterfaceContainer/Editor"]
|
||||
layout_mode = 1
|
||||
|
|
4
src/UIAppVersion.gd
Normal file
4
src/UIAppVersion.gd
Normal file
|
@ -0,0 +1,4 @@
|
|||
extends Label
|
||||
|
||||
func _ready():
|
||||
text = "v" + ProjectSettings.get_setting("application/config/version")
|
Loading…
Add table
Add a link
Reference in a new issue