diff --git a/3D Input/hühnchen kopf unwrapped and rigged.blend b/3D Input/hühnchen kopf unwrapped and rigged.blend new file mode 100644 index 0000000..8f5ad02 Binary files /dev/null and b/3D Input/hühnchen kopf unwrapped and rigged.blend differ diff --git a/3D Input/hühnchen kopf unwrapped.blend b/3D Input/hühnchen kopf unwrapped.blend deleted file mode 100644 index 1c319d4..0000000 Binary files a/3D Input/hühnchen kopf unwrapped.blend and /dev/null differ diff --git a/3D Input/hühnchen kopf unwrapped.blend1 b/3D Input/hühnchen kopf unwrapped.blend1 deleted file mode 100644 index 59040dc..0000000 Binary files a/3D Input/hühnchen kopf unwrapped.blend1 and /dev/null differ diff --git a/BodyConfig/LoadBodyParts.gd b/BodyConfig/LoadBodyParts.gd index b54b8a7..5ace896 100644 --- a/BodyConfig/LoadBodyParts.gd +++ b/BodyConfig/LoadBodyParts.gd @@ -1,5 +1,6 @@ extends VBoxContainer +var _custom_button = preload("res://UI/LimbButton.tscn") onready var delete = get_node("Delete") @@ -7,7 +8,7 @@ onready var delete = get_node("Delete") # Called when the node enters the scene tree for the first time. func _ready(): for entry in BodyPartLoader.bodyparts: - var button = Button.new() + var button = _custom_button.instance() button.text = entry add_child(button) button.connect("pressed", get_parent().get_parent().get_parent(), "body_part_chosen", [button.text]) diff --git a/BodyConfig/bodyBuilderMenu.tscn b/BodyConfig/bodyBuilderMenu.tscn index c71572d..a8fceec 100644 --- a/BodyConfig/bodyBuilderMenu.tscn +++ b/BodyConfig/bodyBuilderMenu.tscn @@ -1,9 +1,13 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=9 format=2] [ext_resource path="res://BodyParts/BodyBase/BodyBase.tscn" type="PackedScene" id=1] [ext_resource path="res://BodyConfig/bodyBuildingScript.gd" type="Script" id=2] [ext_resource path="res://BodyConfig/LoadBodyParts.gd" type="Script" id=3] [ext_resource path="res://Ingame/Arena.tscn" type="PackedScene" id=4] +[ext_resource path="res://Resources/Fonts/SmallButtonFont.tres" type="DynamicFont" id=5] +[ext_resource path="res://Resources/Styles/ButtonHoverStyle.tres" type="StyleBox" id=6] +[ext_resource path="res://Resources/Styles/ButtonPressedStyle.tres" type="StyleBox" id=7] +[ext_resource path="res://Resources/Styles/ButtonNormalStyle.tres" type="StyleBox" id=8] [node name="Body Builder Menu" type="Spatial"] script = ExtResource( 2 ) @@ -30,40 +34,63 @@ __meta__ = { } [node name="VBoxC" type="VBoxContainer" parent="GUI/HBoxC"] -margin_right = 300.0 +margin_right = 301.0 margin_bottom = 600.0 rect_min_size = Vector2( 300, 500 ) script = ExtResource( 3 ) [node name="HBoxContainer" type="HBoxContainer" parent="GUI/HBoxC/VBoxC"] -margin_right = 300.0 -margin_bottom = 14.0 +margin_right = 301.0 +margin_bottom = 38.0 [node name="Label" type="Label" parent="GUI/HBoxC/VBoxC/HBoxContainer"] -margin_right = 36.0 -margin_bottom = 14.0 +margin_right = 47.0 +margin_bottom = 38.0 +custom_fonts/font = ExtResource( 5 ) text = "Cost: " [node name="ProgressBar" type="ProgressBar" parent="GUI/HBoxC/VBoxC/HBoxContainer"] -margin_left = 40.0 -margin_right = 240.0 -margin_bottom = 14.0 -rect_min_size = Vector2( 200, 0 ) +margin_left = 51.0 +margin_right = 301.0 +margin_bottom = 38.0 +rect_min_size = Vector2( 250, 30 ) +size_flags_vertical = 3 +custom_fonts/font = ExtResource( 5 ) [node name="Start" type="Button" parent="GUI/HBoxC/VBoxC"] -margin_top = 18.0 -margin_right = 300.0 -margin_bottom = 38.0 +margin_top = 42.0 +margin_right = 301.0 +margin_bottom = 80.0 +custom_styles/hover = ExtResource( 6 ) +custom_styles/pressed = ExtResource( 7 ) +custom_styles/normal = ExtResource( 8 ) +custom_fonts/font = ExtResource( 5 ) text = "Start Game" +[node name="Spacing" type="Control" parent="GUI/HBoxC/VBoxC"] +margin_top = 84.0 +margin_right = 301.0 +margin_bottom = 104.0 +rect_min_size = Vector2( 0, 20 ) + [node name="Delete" type="Button" parent="GUI/HBoxC/VBoxC"] -margin_top = 42.0 -margin_right = 300.0 -margin_bottom = 62.0 +margin_top = 108.0 +margin_right = 301.0 +margin_bottom = 146.0 +custom_styles/hover = ExtResource( 6 ) +custom_styles/pressed = ExtResource( 7 ) +custom_styles/normal = ExtResource( 8 ) +custom_fonts/font = ExtResource( 5 ) text = "Delete" +[node name="Spacing2" type="Control" parent="GUI/HBoxC/VBoxC"] +margin_top = 150.0 +margin_right = 301.0 +margin_bottom = 170.0 +rect_min_size = Vector2( 0, 20 ) + [node name="ViewportContainer" type="ViewportContainer" parent="GUI/HBoxC"] -margin_left = 304.0 +margin_left = 305.0 margin_right = 1024.0 margin_bottom = 600.0 rect_min_size = Vector2( 500, 500 ) @@ -72,7 +99,7 @@ size_flags_vertical = 3 stretch = true [node name="Viewport" type="Viewport" parent="GUI/HBoxC/ViewportContainer"] -size = Vector2( 720, 600 ) +size = Vector2( 719, 600 ) handle_input_locally = false render_target_update_mode = 3 diff --git a/Resources/Fonts/SmallButtonFont.tres b/Resources/Fonts/SmallButtonFont.tres new file mode 100644 index 0000000..9bcdd35 --- /dev/null +++ b/Resources/Fonts/SmallButtonFont.tres @@ -0,0 +1,7 @@ +[gd_resource type="DynamicFont" load_steps=2 format=2] + +[ext_resource path="res://Resources/Fonts/beneg___.ttf" type="DynamicFontData" id=1] + +[resource] +size = 36 +font_data = ExtResource( 1 ) diff --git a/UI/LimbButton.tscn b/UI/LimbButton.tscn new file mode 100644 index 0000000..02008a2 --- /dev/null +++ b/UI/LimbButton.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://Resources/Fonts/SmallButtonFont.tres" type="DynamicFont" id=1] +[ext_resource path="res://Resources/Styles/ButtonHoverStyle.tres" type="StyleBox" id=2] +[ext_resource path="res://Resources/Styles/ButtonPressedStyle.tres" type="StyleBox" id=3] +[ext_resource path="res://Resources/Styles/ButtonNormalStyle.tres" type="StyleBox" id=4] + +[node name="Button" type="Button"] +margin_right = 301.0 +margin_bottom = 38.0 +custom_styles/hover = ExtResource( 2 ) +custom_styles/pressed = ExtResource( 3 ) +custom_styles/normal = ExtResource( 4 ) +custom_fonts/font = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +}