mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 10:02:18 +02:00
Update examples
This commit is contained in:
@@ -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")
|
||||
|
Reference in New Issue
Block a user