project/build/default/main/entername.gui_scriptc
2025-08-25 01:59:20 +01:00

53 lines
No EOL
1.6 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

ß
À function init(self)
-- Add initialization code here
-- Learn more: https://defold.com/manuals/script/
-- Remove this function if not needed
local node = gui.get_node("enter")
gui.set_position(node, vmath.vector3(450,250,1))
gui.set_color(gui.get_node("enter"), vmath.vector4(0.4118, 0.2863, 0.0706, 1.0))
end
function final(self)
-- Add finalization code here
-- Learn more: https://defold.com/manuals/script/
-- Remove this function if not needed
end
function update(self, dt)
-- Add update code here
-- Learn more: https://defold.com/manuals/script/
-- Remove this function if not needed
end
function on_message(self, message_id, message, sender)
if message_id == hash("enterthename") then
gui.set_text(gui.get_node("enter"), message.enter)
gui.set_color(gui.get_node("name"), vmath.vector4(0, 1, 0, 1))
end
if message_id == hash("written_name") then
gui.set_text(gui.get_node("name"), message.name)
gui.set_color(gui.get_node("name"), vmath.vector4(1, 0, 0, 1))
end
end
function on_input(self, action_id, action)
-- Add input-handling code here. The game object this script is attached to
-- must have acquired input focus:
--
-- msg.post(".", "acquire_input_focus")
--
-- All mapped input bindings will be received. Mouse and touch input will
-- be received regardless of where on the screen it happened.
-- Learn more: https://defold.com/manuals/input/
-- Remove this function if not needed
end
function on_reload(self)
-- Add reload-handling code here
-- Learn more: https://defold.com/manuals/hot-reload/
-- Remove this function if not needed
end
@main/entername.gui_script"