Update examples

This commit is contained in:
Insality
2025-03-27 00:30:37 +02:00
parent 7640e207a4
commit b053b5044b
15 changed files with 125 additions and 146 deletions

View File

@@ -1,30 +1,27 @@
local lang = require("lang.lang")
local druid = require("druid.druid")
local event = require("event.event")
local component = require("druid.component")
local panthera = require("panthera.panthera")
local window_animation_panthera = require("example.examples.windows.window_animation_panthera")
---@class examples.window_language: druid.component
---@class examples.window_language: druid.widget
---@field text_header druid.text
---@field button_close druid.button
---@field druid druid.instance
---@field lang_buttons table<string, druid.button>
---@field grid druid.grid
---@field on_language_change event
local M = component.create("window_language")
---@field animation panthera.instance
local M = {}
---Color: #F0FBFF
local DEFAULT_LANGUAGE_COLOR = vmath.vector4(240/255, 251/255, 255/255, 1.0)
---Color: #E6DF9F
local SELECTED_LANGUAGE_COLOR = vmath.vector4(230/255, 223/255, 159/255, 1.0)
---@param template string
---@param nodes table<hash, node>
function M:init(template, nodes)
self.druid = self:get_druid(template, nodes)
function M:init()
self.lang_buttons = {}
self.created_nodes = {}
self.prefab = self:get_node("button_prefab")