Extensive work on the sideview and initial work on player profiles, inventory display, and renaming adventurerdata vs adventurer to adventurer vs adventurersprite
This commit is contained in:
@@ -2,6 +2,7 @@ class_name GamePanel extends MarginContainer
|
||||
|
||||
const notice_template = preload("res://templates/notice_panel.tscn")
|
||||
const quest_progress_bar_template = preload("res://templates/quest_progress_bar.tscn")
|
||||
const quest_view_template = preload("res://templates/quest_view.tscn")
|
||||
|
||||
signal time_changed(time : float)
|
||||
|
||||
@@ -18,12 +19,20 @@ func add_quest_progress_bar(quest : Quest) -> void:
|
||||
var qpb : QuestProgressBar = quest_progress_bar_template.instantiate()
|
||||
%QuestList.add_child(qpb)
|
||||
qpb.setup(quest)
|
||||
|
||||
#TODO: Change the hero portrait to match
|
||||
if quest.steps > 1:
|
||||
for i in range(quest.steps-1):
|
||||
qpb.add_waypoint(float(i) / quest.steps, quest.step_messages[i])
|
||||
|
||||
|
||||
func add_quest_view(quest : Quest, visible : bool) -> void:
|
||||
var qv : QuestView = quest_view_template.instantiate()
|
||||
qv.visible = visible
|
||||
%QuestView.add_child(qv)
|
||||
qv.setup(quest)
|
||||
|
||||
|
||||
func switch_panel(active : bool) -> void:
|
||||
%OpenShift.visible = active
|
||||
%WorkingShift.visible = !active
|
||||
@@ -47,6 +56,14 @@ func connect_visitor_spawner(spawner : VisitorSpawner) -> void:
|
||||
func update_visitor_count(current : int, total : int) -> void:
|
||||
%OpenList/VisitorsLabel.text = "Visitors: %d/%d" % [current, total]
|
||||
|
||||
func populate_quest_views() -> void:
|
||||
var count : int = 0
|
||||
for quest in Guild.quests:
|
||||
if quest.is_taken():
|
||||
count+=1
|
||||
add_quest_view(quest, count == 1)
|
||||
%QuestViewerButton.disabled = (count == 0)
|
||||
|
||||
func populate_quest_bars() -> void:
|
||||
|
||||
var count : int = 0
|
||||
@@ -64,6 +81,7 @@ func notice(msg : String, time : float) -> void:
|
||||
|
||||
var dragging : bool = false
|
||||
var drag_pos : Vector2
|
||||
|
||||
func _on_drag_region_gui_input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseButton:
|
||||
if event.button_index == MOUSE_BUTTON_LEFT:
|
||||
|
||||
Reference in New Issue
Block a user