2018-08-07 08:18:26 +00:00
|
|
|
extends Node
|
|
|
|
|
|
|
|
const WINDOW_TITLE_INPUT = "GUI/Settings/Menus/TabContainer/Test/ScrollContainer/VBoxContainer/TitleBox/Title"
|
|
|
|
|
|
|
|
func _ready():
|
|
|
|
change_title()
|
|
|
|
get_tree().get_root().connect("size_changed", self, "on_window_size_changed")
|
|
|
|
|
|
|
|
global.character = get_node( "Game/Character" )
|
|
|
|
global.character_camera = get_node( "Game/Character/Camera_rotation_helper/Camera" )
|
2018-08-07 13:25:50 +00:00
|
|
|
|
2018-08-08 12:31:51 +00:00
|
|
|
global.character.get_node( "MeshInstance" ).get_surface_material(0).albedo_color = global.character_color
|
|
|
|
print( str(global.character_name) )
|
|
|
|
print( str(global.character_color) )
|
2018-08-07 08:18:26 +00:00
|
|
|
|
|
|
|
$GUI.pause()
|
|
|
|
global.character_camera.make_current()
|
|
|
|
|
|
|
|
func _process(delta):
|
|
|
|
pass
|
|
|
|
|
|
|
|
func on_window_size_changed():
|
|
|
|
change_title()
|
|
|
|
|
|
|
|
func change_title():
|
|
|
|
var title_node = get_node( WINDOW_TITLE_INPUT )
|
|
|
|
var title = "Khanat"
|
|
|
|
if title_node and not title_node.text.strip_edges() == "":
|
|
|
|
title = title_node.text.strip_edges()
|
|
|
|
title += " (" + String(OS.get_window_size().x) + "x" + String(OS.get_window_size().y) + ")"
|
|
|
|
OS.set_window_title( title )
|