diff --git a/GodotUserInterface/MainMenu.tscn b/GodotUserInterface/MainMenu.tscn new file mode 100644 index 0000000..abca793 --- /dev/null +++ b/GodotUserInterface/MainMenu.tscn @@ -0,0 +1,67 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://NewGame.gd" type="Script" id=1] +[ext_resource path="res://new_dynamicfont.tres" type="DynamicFont" id=2] + +[node name="MarginContainer" type="MarginContainer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +custom_constants/margin_right = 120 +custom_constants/margin_top = 80 +custom_constants/margin_left = 120 +custom_constants/margin_bottom = 80 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +margin_left = 120.0 +margin_top = 80.0 +margin_right = 904.0 +margin_bottom = 520.0 + +[node name="Title" type="Label" parent="VBoxContainer"] +margin_right = 784.0 +margin_bottom = 19.0 +custom_fonts/font = ExtResource( 2 ) +text = "Title" +align = 1 +autowrap = true + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"] +margin_top = 23.0 +margin_right = 784.0 +margin_bottom = 42.0 + +[node name="NewGame" type="Label" parent="VBoxContainer/HBoxContainer"] +margin_right = 258.0 +margin_bottom = 19.0 +mouse_filter = 1 +size_flags_horizontal = 3 +custom_fonts/font = ExtResource( 2 ) +text = "New Game" +align = 1 +script = ExtResource( 1 ) + +[node name="StartGame" type="Label" parent="VBoxContainer/HBoxContainer"] +margin_left = 262.0 +margin_right = 521.0 +margin_bottom = 19.0 +size_flags_horizontal = 3 +custom_fonts/font = ExtResource( 2 ) +text = "Start Game" +align = 1 + +[node name="Settings" type="Label" parent="VBoxContainer/HBoxContainer"] +margin_left = 525.0 +margin_right = 784.0 +margin_bottom = 19.0 +size_flags_horizontal = 3 +custom_fonts/font = ExtResource( 2 ) +text = "Settings" +align = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[connection signal="gui_input" from="VBoxContainer/HBoxContainer/NewGame" to="VBoxContainer/HBoxContainer/NewGame" method="_on_NewGame_gui_input"] diff --git a/GodotUserInterface/NewGame.gd b/GodotUserInterface/NewGame.gd new file mode 100644 index 0000000..a048479 --- /dev/null +++ b/GodotUserInterface/NewGame.gd @@ -0,0 +1,8 @@ +extends Label + +func _ready(): + pass # Replace with function body. + +func _on_NewGame_gui_input(event): + if (event is InputEventMouseButton && event.pressed && event.button_index == 1): + get_tree().change_scene("res://temp.tscn") diff --git a/GodotUserInterface/default_env.tres b/GodotUserInterface/default_env.tres new file mode 100644 index 0000000..20207a4 --- /dev/null +++ b/GodotUserInterface/default_env.tres @@ -0,0 +1,7 @@ +[gd_resource type="Environment" load_steps=2 format=2] + +[sub_resource type="ProceduralSky" id=1] + +[resource] +background_mode = 2 +background_sky = SubResource( 1 ) diff --git a/GodotUserInterface/icon.png b/GodotUserInterface/icon.png new file mode 100644 index 0000000..c98fbb6 Binary files /dev/null and b/GodotUserInterface/icon.png differ diff --git a/GodotUserInterface/icon.png.import b/GodotUserInterface/icon.png.import new file mode 100644 index 0000000..96cbf46 --- /dev/null +++ b/GodotUserInterface/icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.png" +dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/GodotUserInterface/new_dynamicfont.tres b/GodotUserInterface/new_dynamicfont.tres new file mode 100644 index 0000000..d089ddd --- /dev/null +++ b/GodotUserInterface/new_dynamicfont.tres @@ -0,0 +1,6 @@ +[gd_resource type="DynamicFont" load_steps=2 format=2] + +[ext_resource path="res://roboto/Roboto-Regular.ttf" type="DynamicFontData" id=1] + +[resource] +font_data = ExtResource( 1 ) diff --git a/GodotUserInterface/project.godot b/GodotUserInterface/project.godot new file mode 100644 index 0000000..0561eef --- /dev/null +++ b/GodotUserInterface/project.godot @@ -0,0 +1,23 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=4 + +[application] + +config/name="rpgresearch" +run/main_scene="res://MainMenu.tscn" +config/icon="res://icon.png" + +[physics] + +common/enable_pause_aware_picking=true + +[rendering] + +environment/default_environment="res://default_env.tres" diff --git a/GodotUserInterface/temp.tscn b/GodotUserInterface/temp.tscn new file mode 100644 index 0000000..093d1e5 --- /dev/null +++ b/GodotUserInterface/temp.tscn @@ -0,0 +1,14 @@ +[gd_scene format=2] + +[node name="MarginContainer" type="MarginContainer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Label" type="Label" parent="."] +margin_top = 293.0 +margin_right = 1024.0 +margin_bottom = 307.0 +text = "Switched scenes"