This commit is contained in:
Face
2025-09-07 19:14:17 +03:00
parent 7220880e95
commit b4e151e79f
5 changed files with 587 additions and 0 deletions

View File

@@ -2,12 +2,14 @@ extends Button
const HISTORY = preload("res://Scenes/BrowserMenus/history.tscn")
const SETTINGS = preload("res://Scenes/BrowserMenus/settings.tscn")
const HELP = preload("res://Scenes/BrowserMenus/help.tscn")
@onready var tab_container: TabManager = $"../../TabContainer"
@onready var main: Main = $"../../../"
var history_scene: PopupPanel = null
var settings_scene: PopupPanel = null
var help_scene: PopupPanel = null
func _on_pressed() -> void:
%OptionsMenu.show()
@@ -44,6 +46,8 @@ func _on_options_menu_id_pressed(id: int) -> void:
show_history()
if id == 5: # downloads
show_downloads()
if id == 8: # help
show_help()
if id == 9: # settings
show_settings()
if id == 10: # exit
@@ -67,6 +71,19 @@ func _on_history_closed() -> void:
func show_downloads() -> void:
main.download_manager.show_downloads_history()
func show_help() -> void:
if help_scene == null:
help_scene = HELP.instantiate()
main.add_child(help_scene)
help_scene.connect("popup_hide", _on_help_closed)
else:
help_scene.show()
func _on_help_closed() -> void:
if help_scene:
help_scene.hide()
func show_settings() -> void:
if settings_scene == null:
settings_scene = SETTINGS.instantiate()