This commit is contained in:
mathias 2020-02-02 15:27:26 +01:00
commit 2e18e9e193
10 changed files with 105 additions and 19 deletions

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/huhntextur.png-a31af8e4947b19bec12f70e34f5f09d2.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://3D Input/huhntextur.png"
dest_files=[ "res://.import/huhntextur.png-a31af8e4947b19bec12f70e34f5f09d2.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

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,6 @@
extends VBoxContainer extends VBoxContainer
var _custom_button = preload("res://UI/LimbButton.tscn")
onready var delete = get_node("Delete") 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. # Called when the node enters the scene tree for the first time.
func _ready(): func _ready():
for entry in BodyPartLoader.bodyparts: for entry in BodyPartLoader.bodyparts:
var button = Button.new() var button = _custom_button.instance()
button.text = entry button.text = entry
add_child(button) add_child(button)
button.connect("pressed", get_parent().get_parent().get_parent(), "body_part_chosen", [button.text]) button.connect("pressed", get_parent().get_parent().get_parent(), "body_part_chosen", [button.text])

View File

@ -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://BodyParts/BodyBase/BodyBase.tscn" type="PackedScene" id=1]
[ext_resource path="res://BodyConfig/bodyBuildingScript.gd" type="Script" id=2] [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://BodyConfig/LoadBodyParts.gd" type="Script" id=3]
[ext_resource path="res://Ingame/Arena.tscn" type="PackedScene" id=4] [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"] [node name="Body Builder Menu" type="Spatial"]
script = ExtResource( 2 ) script = ExtResource( 2 )
@ -30,40 +34,63 @@ __meta__ = {
} }
[node name="VBoxC" type="VBoxContainer" parent="GUI/HBoxC"] [node name="VBoxC" type="VBoxContainer" parent="GUI/HBoxC"]
margin_right = 300.0 margin_right = 301.0
margin_bottom = 600.0 margin_bottom = 600.0
rect_min_size = Vector2( 300, 500 ) rect_min_size = Vector2( 300, 500 )
script = ExtResource( 3 ) script = ExtResource( 3 )
[node name="HBoxContainer" type="HBoxContainer" parent="GUI/HBoxC/VBoxC"] [node name="HBoxContainer" type="HBoxContainer" parent="GUI/HBoxC/VBoxC"]
margin_right = 300.0 margin_right = 301.0
margin_bottom = 14.0 margin_bottom = 38.0
[node name="Label" type="Label" parent="GUI/HBoxC/VBoxC/HBoxContainer"] [node name="Label" type="Label" parent="GUI/HBoxC/VBoxC/HBoxContainer"]
margin_right = 36.0 margin_right = 47.0
margin_bottom = 14.0 margin_bottom = 38.0
custom_fonts/font = ExtResource( 5 )
text = "Cost: " text = "Cost: "
[node name="ProgressBar" type="ProgressBar" parent="GUI/HBoxC/VBoxC/HBoxContainer"] [node name="ProgressBar" type="ProgressBar" parent="GUI/HBoxC/VBoxC/HBoxContainer"]
margin_left = 40.0 margin_left = 51.0
margin_right = 240.0 margin_right = 301.0
margin_bottom = 14.0 margin_bottom = 38.0
rect_min_size = Vector2( 200, 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"] [node name="Start" type="Button" parent="GUI/HBoxC/VBoxC"]
margin_top = 18.0 margin_top = 42.0
margin_right = 300.0 margin_right = 301.0
margin_bottom = 38.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" 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"] [node name="Delete" type="Button" parent="GUI/HBoxC/VBoxC"]
margin_top = 42.0 margin_top = 108.0
margin_right = 300.0 margin_right = 301.0
margin_bottom = 62.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" 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"] [node name="ViewportContainer" type="ViewportContainer" parent="GUI/HBoxC"]
margin_left = 304.0 margin_left = 305.0
margin_right = 1024.0 margin_right = 1024.0
margin_bottom = 600.0 margin_bottom = 600.0
rect_min_size = Vector2( 500, 500 ) rect_min_size = Vector2( 500, 500 )
@ -72,7 +99,7 @@ size_flags_vertical = 3
stretch = true stretch = true
[node name="Viewport" type="Viewport" parent="GUI/HBoxC/ViewportContainer"] [node name="Viewport" type="Viewport" parent="GUI/HBoxC/ViewportContainer"]
size = Vector2( 720, 600 ) size = Vector2( 719, 600 )
handle_input_locally = false handle_input_locally = false
render_target_update_mode = 3 render_target_update_mode = 3

View File

@ -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 )

17
UI/LimbButton.tscn Normal file
View File

@ -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
}