mirror of
https://github.com/Insality/druid.git
synced 2025-09-28 18:42:19 +02:00
add kenney assets and start gui screen
This commit is contained in:
24
example/kenney/init.script
Normal file
24
example/kenney/init.script
Normal file
@@ -0,0 +1,24 @@
|
||||
local const = require("druid.const")
|
||||
local settings = require("druid.settings")
|
||||
local lang = require("example.kenney.lang")
|
||||
|
||||
|
||||
local function setup_druid()
|
||||
settings.play_sound = function(name)
|
||||
sound.play("kenney:/sound#" .. name)
|
||||
end
|
||||
|
||||
settings.get_text = function(lang_id)
|
||||
return lang.get_locale(lang_id)
|
||||
end
|
||||
|
||||
-- TODO: Call druid.finish_setup?
|
||||
-- Need to update all gui, in case, when gui init was befure this init
|
||||
msg.post("/gui#main", const.ON_CHANGE_LANGUAGE)
|
||||
end
|
||||
|
||||
|
||||
function init(self)
|
||||
setup_druid()
|
||||
msg.post("@render:", "clear_color", { color = vmath.vector4(0.8, 0.9, 0.85, 1) })
|
||||
end
|
Reference in New Issue
Block a user