Update with latest libs

This commit is contained in:
Insality
2025-11-26 09:53:42 +02:00
parent 94988647fd
commit d0866a55c3
6 changed files with 20 additions and 59 deletions

View File

@@ -191,6 +191,7 @@ You can find the full **Druid** functions at [Quick API Reference](api/quick_api
To better understand **Druid**, read the following documentation: To better understand **Druid**, read the following documentation:
- [How To GUI in Defold](https://forum.defold.com/t/how-to-gui-in-defold/73256) - [How To GUI in Defold](https://forum.defold.com/t/how-to-gui-in-defold/73256)
- [Druid Workshop](https://youtu.be/qF19qpjZe9c)
- [Widgets](wiki/widgets.md) - [Widgets](wiki/widgets.md)
- [Druid styles](wiki/styles.md) - [Druid styles](wiki/styles.md)
- [Advanced Setup](wiki/advanced-setup.md) - [Advanced Setup](wiki/advanced-setup.md)

View File

@@ -48,8 +48,18 @@ end
--- Generic setup that should be done once per application --- Generic setup that should be done once per application
---@param self druid.example ---@param self druid.example
local function setup_druid(self) local function setup_druid(self)
lang.init() lang.init({
lang.set_lang("en") -- Force default start language to EN, switch through the UI to check { id = "en", path = "/example/locales/en.json" },
{ id = "ru", path = "/example/locales/ru.json" },
{ id = "es", path = "/example/locales/es.json" },
{ id = "de", path = "/example/locales/de.json" },
{ id = "fr", path = "/example/locales/fr.json" },
{ id = "ja", path = "/example/locales/ja.json" },
{ id = "pt", path = "/example/locales/pt.json" },
{ id = "it", path = "/example/locales/it.json" },
{ id = "kr", path = "/example/locales/kr.json" },
{ id = "zh", path = "/example/locales/zh.json" },
}, "en")
druid.set_text_function(lang.txp) druid.set_text_function(lang.txp)
window.set_listener(function(_, event) window.set_listener(function(_, event)

View File

@@ -1,24 +1,9 @@
local lang = require("lang.lang")
local druid = require("druid.druid") local druid = require("druid.druid")
local window_confirmation = require("example.examples.windows.window_confirmation.window_confirmation") local window_confirmation = require("example.examples.windows.window_confirmation.window_confirmation")
local function debug_stub(self)
if msg.url().socket ~= hash("window_confirmation") then
return
end
lang.init()
druid.set_text_function(lang.txp)
end
function init(self) function init(self)
debug_stub(self)
-- Using component instead put all inside gui_script to
-- allow use it as example and as separate collection
self.druid = druid.new(self) self.druid = druid.new(self)
self.druid:new(window_confirmation) self.druid:new(window_confirmation)
end end

View File

@@ -4,21 +4,7 @@ local druid = require("druid.druid")
local window_info = require("example.examples.windows.window_info.window_info") local window_info = require("example.examples.windows.window_info.window_info")
local function debug_stub(self)
if msg.url().socket ~= hash("window_info") then
return
end
lang.init()
druid.set_text_function(lang.txp)
end
function init(self) function init(self)
debug_stub(self)
-- Using component instead put all inside gui_script to
-- allow use it as example and as separate collection
self.druid = druid.new(self) self.druid = druid.new(self)
self.druid:new(window_info) self.druid:new(window_info)
end end

View File

@@ -1,24 +1,8 @@
local lang = require("lang.lang")
local druid = require("druid.druid") local druid = require("druid.druid")
local window_language = require("example.examples.windows.window_language.window_language") local window_language = require("example.examples.windows.window_language.window_language")
local function debug_stub(self)
if msg.url().socket ~= hash("window_language") then
return
end
lang.init()
druid.set_text_function(lang.txp)
end
function init(self) function init(self)
debug_stub(self)
-- Using component instead put all inside gui_script to
-- allow use it as example and as separate collection
self.druid = druid.new(self) self.druid = druid.new(self)
self.druid:new(window_language) self.druid:new(window_language)
end end

View File

@@ -20,9 +20,9 @@ developer = Maksim Tuprikov
custom_resources = /example/locales custom_resources = /example/locales
dependencies#0 = https://github.com/britzl/deftest/archive/refs/tags/2.8.0.zip dependencies#0 = https://github.com/britzl/deftest/archive/refs/tags/2.8.0.zip
dependencies#1 = https://github.com/Insality/defold-saver/archive/refs/tags/5.zip dependencies#1 = https://github.com/Insality/defold-saver/archive/refs/tags/5.zip
dependencies#2 = https://github.com/Insality/defold-tweener/archive/refs/tags/3.zip dependencies#2 = https://github.com/Insality/defold-tweener/archive/refs/tags/6.zip
dependencies#3 = https://github.com/Insality/panthera/archive/refs/tags/runtime.4.zip dependencies#3 = https://github.com/Insality/panthera/archive/refs/tags/runtime.5.zip
dependencies#4 = https://github.com/Insality/defold-lang/archive/refs/tags/3.zip dependencies#4 = https://github.com/Insality/defold-lang/archive/refs/tags/4.zip
dependencies#5 = https://github.com/Insality/defold-event/archive/refs/tags/13.zip dependencies#5 = https://github.com/Insality/defold-event/archive/refs/tags/13.zip
dependencies#6 = https://github.com/subsoap/defos/archive/refs/tags/v2.8.0.zip dependencies#6 = https://github.com/subsoap/defos/archive/refs/tags/v2.8.0.zip
dependencies#7 = https://github.com/Insality/asset-store/archive/refs/tags/1.zip dependencies#7 = https://github.com/Insality/asset-store/archive/refs/tags/1.zip
@@ -103,11 +103,6 @@ max_instances = 128
[saver] [saver]
autosave_timer = 2 autosave_timer = 2
[lang]
path = /example/locales
langs = en,ru,es,de,fr,ja,pt,it,kr,zh
default = es
[event] [event]
use_xpcall = 1 use_xpcall = 1