Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
To Do Break Down
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
breakdown
To Do Break Down
Commits
4a2608c5
Commit
4a2608c5
authored
Jan 18, 2022
by
Julia Santos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Still working on inventory UI, still a bit glitchy
parent
14edd5eb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
17 deletions
+15
-17
Inventory UI.gd
Scripts/Inventory UI.gd
+14
-16
Be Vietnam.tres
assets/Fonts/Be Vietnam.tres
+1
-1
No files found.
Scripts/Inventory UI.gd
View file @
4a2608c5
...
...
@@ -8,11 +8,11 @@ func _ready():
updateUI()
func updateUI():
if firstIndex >= inventory.get_item_count() and firstIndex != 0:
firstIndex = firstIndex - 5
var i = 0
while i < 5:
if i < inventory.get_item_count():
if
firstIndex +
i < inventory.get_item_count():
items[i].set_disabled(false)
items[i].set_button_icon(inventory.get_item_icon(firstIndex + i))
items[i].set_tooltip(inventory.get_item_text(firstIndex+i))
...
...
@@ -28,6 +28,16 @@ func updateUI():
#set index?
print("Updated inventory UI")
func _on_Inventory_right_pressed():
if (inventory.get_item_count() > firstIndex + 5):
firstIndex = firstIndex + 5
updateUI()
func _on_Inventory_left_pressed():
if firstIndex != 0:
firstIndex = firstIndex - 5
updateUI()
func disableRest(num):
var j = 0
...
...
@@ -84,15 +94,3 @@ func _on_5_toggled(button_pressed):
enableRest()
inventory.unselect_all()
print(inventory.get_selected_items())
func _on_Inventory_right_pressed():
if (inventory.get_item_count() > firstIndex + 4):
firstIndex = firstIndex + 5
updateUI()
func _on_Inventory_left_pressed():
if firstIndex != 0:
firstIndex = firstIndex - 5
updateUI()
assets/Fonts/Be Vietnam.tres
View file @
4a2608c5
...
...
@@ -3,5 +3,5 @@
[ext_resource path="res://assets/Fonts/BeVietnamPro-Medium.ttf" type="DynamicFontData" id=1]
[resource]
size = 1
2
size = 1
5
font_data = ExtResource( 1 )
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment