diff --git a/Main.tscn b/Main.tscn index a85fd48..a6f0b5c 100644 --- a/Main.tscn +++ b/Main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=11 format=2] +[gd_scene load_steps=12 format=2] [ext_resource path="res://src/actors/players/playerE/PlayerE.tscn" type="PackedScene" id=1] [ext_resource path="res://src/levels/TestBox.tscn" type="PackedScene" id=2] @@ -7,6 +7,7 @@ [ext_resource path="res://src/classes/camera_guide.gd" type="Script" id=5] [ext_resource path="res://src/Camera2D.gd" type="Script" id=6] [ext_resource path="res://src/Main.gd" type="Script" id=7] +[ext_resource path="res://assets/items/mushroom_icon.png" type="Texture" id=8] [sub_resource type="Shader" id=2] code = "shader_type canvas_item; @@ -68,3 +69,7 @@ position = Vector2( 160, 90 ) current = true script = ExtResource( 6 ) tracking_node_path = NodePath("../CameraGuide") + +[node name="MushroomIcon" type="Sprite" parent="ViewportContainer/Viewport"] +position = Vector2( 60, 160 ) +texture = ExtResource( 8 ) diff --git a/src/ui/HUD.tscn b/src/ui/HUD.tscn index fceaaf2..a1b5dad 100644 --- a/src/ui/HUD.tscn +++ b/src/ui/HUD.tscn @@ -98,29 +98,21 @@ margin_left = 13.0 margin_right = 40.0 margin_bottom = 40.0 -[node name="SelectedInventoryItems" type="GridContainer" parent="."] +[node name="SelectedInventoryItems" type="HBoxContainer" parent="."] unique_name_in_owner = true anchor_top = 1.0 anchor_bottom = 1.0 margin_left = 2.0 margin_top = -18.0 -margin_right = 38.0 -columns = 2 +margin_right = 48.0 +margin_bottom = -2.0 +rect_clip_content = true script = ExtResource( 8 ) -[node name="Panel" type="Panel" parent="SelectedInventoryItems"] -margin_right = 16.0 -margin_bottom = 18.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 +[node name="PrimaryItem" type="TextureRect" parent="SelectedInventoryItems"] +margin_bottom = 16.0 -[node name="PrimaryItem" type="TextureRect" parent="SelectedInventoryItems/Panel"] - -[node name="Panel2" type="Panel" parent="SelectedInventoryItems"] -margin_left = 20.0 -margin_right = 36.0 -margin_bottom = 18.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 - -[node name="SecondaryItem" type="TextureRect" parent="SelectedInventoryItems/Panel2"] +[node name="SecondaryItem" type="TextureRect" parent="SelectedInventoryItems"] +margin_left = 4.0 +margin_right = 4.0 +margin_bottom = 16.0 diff --git a/src/ui/SelectedInventoryItems.gd b/src/ui/SelectedInventoryItems.gd index 87cbdff..2476635 100644 --- a/src/ui/SelectedInventoryItems.gd +++ b/src/ui/SelectedInventoryItems.gd @@ -1,11 +1,11 @@ -extends GridContainer +extends HBoxContainer # Declare member variables here. Examples: # var a = 2 # var b = "text" -onready var primary_item = $Panel/PrimaryItem -onready var secondary_item = $Panel2/SecondaryItem +onready var primary_item = $PrimaryItem +onready var secondary_item = $SecondaryItem # Called when the node enters the scene tree for the first time.