Working on fixing a bug with browser
This commit is contained in:
@@ -67,6 +67,9 @@ func _add_message(sender: String, message: String, type: String = "normal"):
|
||||
func focus_input():
|
||||
chat_input.grab_focus()
|
||||
|
||||
func is_typing() -> bool:
|
||||
return chat_input != null and chat_input.has_focus()
|
||||
|
||||
func _on_message_submitted(text: String):
|
||||
if text.strip_edges().is_empty():
|
||||
_close()
|
||||
|
||||
+17
-4
@@ -80,10 +80,23 @@ func _handle_input():
|
||||
func _connect_gamestate():
|
||||
#if GameState:
|
||||
#GameState.character_updated.connect(_update_ui)
|
||||
|
||||
# Request inventory when hub loads
|
||||
if GameState:
|
||||
GameState.request_inventory()
|
||||
GameState.state_changed.connect(_on_state_changed)
|
||||
if Network:
|
||||
Network.connected.connect(_request_inventory_if_ready)
|
||||
_request_inventory_if_ready()
|
||||
|
||||
func _on_state_changed(_state: String):
|
||||
_request_inventory_if_ready()
|
||||
|
||||
func _request_inventory_if_ready():
|
||||
if not GameState or not Network:
|
||||
return
|
||||
if GameState.current_state != GameState.STATE_HUB:
|
||||
return
|
||||
if not Network.is_socket_connected():
|
||||
return
|
||||
GameState.request_inventory()
|
||||
|
||||
|
||||
func _on_tier_selected(tier: int):
|
||||
@@ -125,7 +138,7 @@ func _toggle_char_sheet():
|
||||
func _create_settings_panel():
|
||||
# Create settings button (top right corner, small size)
|
||||
settings_btn = TextureButton.new()
|
||||
settings_btn.custom_minimum_size = Vector2(32, 32)
|
||||
settings_btn.custom_minimum_size = Vector2(64, 64)
|
||||
settings_btn.ignore_texture_size = true
|
||||
settings_btn.stretch_mode = TextureButton.STRETCH_KEEP_ASPECT_CENTERED
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ extends CanvasLayer
|
||||
@onready var status_label = $Panel/VBoxContainer/StatusLabel
|
||||
@onready var file_label = $Panel/VBoxContainer/FileLabel
|
||||
|
||||
var debug: bool = false;
|
||||
|
||||
func _ready():
|
||||
print("[LoadingScreen] _ready called")
|
||||
|
||||
@@ -24,7 +26,9 @@ func _on_update_progress(downloaded: int, total: int, current_file: String):
|
||||
if total > 0:
|
||||
progress_bar.value = (float(downloaded) / float(total)) * 100.0
|
||||
status_label.text = "Downloading assets... (%d/%d)" % [downloaded, total]
|
||||
file_label.text = current_file
|
||||
file_label.text = "This wont take long..."#current_file
|
||||
if debug:
|
||||
file_label.text = current_file
|
||||
else:
|
||||
progress_bar.value = 100.0
|
||||
status_label.text = "No updates needed"
|
||||
|
||||
@@ -6,6 +6,8 @@ extends Node
|
||||
@onready var dungeon_scene = $DungeonScene
|
||||
@onready var death_screen = $DeathScreen
|
||||
|
||||
var _manifest_requested: bool = false
|
||||
|
||||
func _ready():
|
||||
print("[Main] _ready called")
|
||||
_show_screen("LOADING")
|
||||
|
||||
Reference in New Issue
Block a user