Smol UI update

This commit is contained in:
Mark Hoekveen
2019-10-28 14:09:18 +01:00
parent 57a712f140
commit 3f8174e66c
2 changed files with 50 additions and 43 deletions
+4
View File
@@ -7,6 +7,10 @@ var rng = RandomNumberGenerator.new()
func _ready(): func _ready():
rng.randomize() rng.randomize()
var p0 = get_node("../GUI/Parent0")
var p1 = get_node("../GUI/Parent1")
p0.text = ""
p1.text = ""
pass pass
func spawn_a_bitch(): func spawn_a_bitch():
+46 -43
View File
@@ -1,19 +1,18 @@
[gd_scene load_steps=16 format=2] [gd_scene load_steps=16 format=2]
[ext_resource path="res://AnonymousPro-Regular.ttf" type="DynamicFontData" id=1] [ext_resource path="res://AnonymousPro-Regular.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://Creature.tscn" type="PackedScene" id=2] [ext_resource path="res://CreatureLab.gd" type="Script" id=2]
[ext_resource path="res://CreatureLab.gd" type="Script" id=3] [ext_resource path="res://Creature.tscn" type="PackedScene" id=3]
[sub_resource type="CanvasItemMaterial" id=1] [sub_resource type="CanvasItemMaterial" id=1]
[sub_resource type="DynamicFont" id=2] [sub_resource type="DynamicFont" id=13]
font_data = ExtResource( 1 ) font_data = ExtResource( 1 )
[sub_resource type="DynamicFont" id=3] [sub_resource type="Theme" id=14]
font_data = ExtResource( 1 ) default_font = SubResource( 13 )
[sub_resource type="DynamicFont" id=4] [sub_resource type="Theme" id=15]
font_data = ExtResource( 1 )
[sub_resource type="ProceduralSky" id=5] [sub_resource type="ProceduralSky" id=5]
sky_top_color = Color( 0, 0, 0, 1 ) sky_top_color = Color( 0, 0, 0, 1 )
@@ -89,53 +88,63 @@ margin_left = 10.0
margin_top = 10.0 margin_top = 10.0
margin_right = 10.0 margin_right = 10.0
margin_bottom = 10.0 margin_bottom = 10.0
theme = SubResource( 14 )
[node name="Spawn" type="Button" parent="GUI"] [node name="Spawn" type="Button" parent="GUI"]
anchor_top = 1.0 anchor_top = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
margin_left = 50.0 margin_left = 50.0
margin_top = 50.0 margin_top = 50.0
margin_right = 149.0 margin_right = 185.0
margin_bottom = 70.0 margin_bottom = 70.0
text = "Spawn a bitch" text = "Spawn a bitch"
[node name="Kill" type="Button" parent="GUI"] [node name="Kill" type="Button" parent="GUI"]
margin_left = 224.723 margin_left = 1750.0
margin_top = 49.0975 margin_top = 50.0
margin_right = 303.723 margin_right = 1873.0
margin_bottom = 69.0975 margin_bottom = 70.0
shortcut_in_tooltip = false shortcut_in_tooltip = false
text = "Kill a bitch" text = "Kill a bitch"
[node name="Button" type="Button" parent="GUI"] [node name="Button" type="Button" parent="GUI"]
margin_left = 1778.14 margin_left = 860.26
margin_top = 43.5382 margin_top = 980.795
margin_right = 1851.14 margin_right = 1028.26
margin_bottom = 63.5382 margin_bottom = 1042.8
theme = SubResource( 15 )
text = "Combine!" text = "Combine!"
[node name="Parent0" type="RichTextLabel" parent="GUI"] [node name="Parent0" type="RichTextLabel" parent="GUI"]
margin_left = -9.0 margin_top = 910.0
margin_top = 916.0 margin_right = 450.0
margin_right = 447.0 margin_bottom = 1060.0
margin_bottom = 1066.0
rect_min_size = Vector2( 100, 100 ) rect_min_size = Vector2( 100, 100 )
custom_fonts/mono_font = SubResource( 2 ) text = "Dit is een voorbeeldtekst.
custom_fonts/normal_font = SubResource( 3 ) Om te kijken hoe het er uit ziet in de GUI.
Dit is een voorbeeldtekst.
Om te kijken hoe het er uit ziet in de GUI.
Dit is een voorbeeldtekst.
Om te kijken hoe het er uit ziet in de GUI.
"
[node name="Parent1" type="RichTextLabel" parent="GUI"] [node name="Parent1" type="RichTextLabel" parent="GUI"]
margin_left = 1372.0 margin_left = 1450.0
margin_top = 920.0 margin_top = 910.0
margin_right = 1907.0 margin_right = 1900.0
margin_bottom = 1070.0 margin_bottom = 1060.0
rect_min_size = Vector2( 100, 100 ) rect_min_size = Vector2( 100, 100 )
custom_fonts/normal_font = SubResource( 4 ) text = "Dit is een voorbeeldtekst.
Om te kijken hoe het er uit ziet in de GUI.
Dit is een voorbeeldtekst.
Om te kijken hoe het er uit ziet in de GUI.
Dit is een voorbeeldtekst.
Om te kijken hoe het er uit ziet in de GUI."
[node name="Preview0" type="ViewportContainer" parent="GUI"] [node name="Preview0" type="ViewportContainer" parent="GUI"]
margin_left = -7.75415 margin_top = 660.0
margin_top = 657.809 margin_right = 640.0
margin_right = 632.246 margin_bottom = 1140.0
margin_bottom = 1137.81
rect_scale = Vector2( 0.5, 0.5 ) rect_scale = Vector2( 0.5, 0.5 )
[node name="Viewport" type="Viewport" parent="GUI/Preview0"] [node name="Viewport" type="Viewport" parent="GUI/Preview0"]
@@ -149,14 +158,11 @@ gui_disable_input = true
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0237979, 0.798024, 1.44028 ) transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0237979, 0.798024, 1.44028 )
current = true current = true
[node name="Creature" parent="GUI/Preview0/Viewport" instance=ExtResource( 2 )]
visible = false
[node name="Preview1" type="ViewportContainer" parent="GUI"] [node name="Preview1" type="ViewportContainer" parent="GUI"]
margin_left = 1590.76 margin_left = 1580.0
margin_top = 645.532 margin_top = 660.0
margin_right = 2230.76 margin_right = 2220.0
margin_bottom = 1125.53 margin_bottom = 1140.0
rect_scale = Vector2( 0.5, 0.5 ) rect_scale = Vector2( 0.5, 0.5 )
[node name="Viewport" type="Viewport" parent="GUI/Preview1"] [node name="Viewport" type="Viewport" parent="GUI/Preview1"]
@@ -170,15 +176,12 @@ gui_disable_input = true
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0237979, 0.798024, 1.44028 ) transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0237979, 0.798024, 1.44028 )
current = true current = true
[node name="Creature" parent="GUI/Preview1/Viewport" instance=ExtResource( 2 )]
visible = false
[node name="Camera" type="Camera" parent="."] [node name="Camera" type="Camera" parent="."]
transform = Transform( 1, 0, 0, 0, 0.931938, 0.362618, 0, -0.362618, 0.931938, 0, 8.78949, 14.7057 ) transform = Transform( 1, 0, 0, 0, 0.931938, 0.362618, 0, -0.362618, 0.931938, 0, 8.78949, 14.7057 )
[node name="CreatureLab" type="Node" parent="."] [node name="CreatureLab" type="Node" parent="."]
script = ExtResource( 3 ) script = ExtResource( 2 )
Creature = ExtResource( 2 ) Creature = ExtResource( 3 )
[node name="WorldEnvironment" type="WorldEnvironment" parent="."] [node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource( 12 ) environment = SubResource( 12 )