decdb74ade
Bump export_presets.cfg version to 2.3.5. Update CHANGELOG_DRAFT.md. Refactor lobby.gd into LobbyChat, LobbyMainMenu, LobbyRoomList, LobbyRoom. Move Nakama config to environment variables in nakama_manager.gd. Derive auth_manager.gd encryption key from OS.get_unique_id().sha256_text(). Remove Steam email auth fallback. Require auth ticket. Make GachaManager.pull() async in gacha_panel.gd. Remove dummy wallet seeding. Add store_type to IAP payload. Validate IAP receipts server-side in economy.lua. Register gacha module in main.lua. Clean backend_service.gd stubs. Fix featured_banners type safety in gacha_manager.gd. Guards non-array responses. Move tiles_armagedon_a1.res to assets/models/meshes/. Fix import fallback_path.
53 lines
1.1 KiB
GDScript
53 lines
1.1 KiB
GDScript
extends Window
|
|
|
|
@onready var rtl = $TextDisplay/RichTextLabel
|
|
|
|
func _get_file_as_text(path):
|
|
var to_return = null
|
|
var f = FileAccess.open(path, FileAccess.READ)
|
|
if(f != null):
|
|
to_return = f.get_as_text()
|
|
else:
|
|
to_return = str('ERROR: Could not open file. Error code ', FileAccess.get_open_error())
|
|
return to_return
|
|
|
|
func _ready():
|
|
rtl.clear()
|
|
|
|
func _on_OpenFile_pressed():
|
|
$FileDialog.popup_centered()
|
|
|
|
func _on_FileDialog_file_selected(path):
|
|
show_file(path)
|
|
|
|
func _on_Close_pressed():
|
|
self.hide()
|
|
|
|
func show_file(path):
|
|
var text = _get_file_as_text(path)
|
|
if(text == ''):
|
|
text = '<Empty File>'
|
|
rtl.set_text(text)
|
|
self.window_title = path
|
|
|
|
func show_open():
|
|
self.popup_centered()
|
|
$FileDialog.popup_centered()
|
|
|
|
func get_rich_text_label():
|
|
return $TextDisplay/RichTextLabel
|
|
|
|
func _on_Home_pressed():
|
|
rtl.scroll_to_line(0)
|
|
|
|
func _on_End_pressed():
|
|
rtl.scroll_to_line(rtl.get_line_count() -1)
|
|
|
|
func _on_Copy_pressed():
|
|
return
|
|
# OS.clipboard = rtl.text
|
|
|
|
func _on_file_dialog_visibility_changed():
|
|
if rtl.text.length() == 0 and not $FileDialog.visible:
|
|
self.hide()
|