diff --git a/druid/color.lua b/druid/color.lua index 1e72022..dbf64c9 100644 --- a/druid/color.lua +++ b/druid/color.lua @@ -10,7 +10,7 @@ local M = {} ---Get color by string (hex or from palette) ---@param color_id string Color id from palette or hex color ---@return vector4 -function M.get_palette_color(color_id) +function M.get_color(color_id) -- Check is it hex: starts with "#" or contains only 3 or 6 hex symbols if type(color_id) == "string" then if string.sub(color_id, 1, 1) == "#" or string.match(color_id, "^[0-9a-fA-F]+$") then @@ -45,7 +45,7 @@ end ---@param color vector4|vector3|string Color in vector4, vector3 or color id from palette function M.set_color(gui_node, color) if type(color) == "string" then - color = M.get(color) + color = M.get_color(color) end gui.set(gui_node, COLOR_X, color.x) diff --git a/druid/druid.lua b/druid/druid.lua index 71c3b54..028495b 100644 --- a/druid/druid.lua +++ b/druid/druid.lua @@ -111,7 +111,7 @@ local function wrap_widget(widget) end ----Get a binded widget to the current game object. +---Get a binded widget to the current game object with "go_widget" gui component name. --- msg.url(nil, nil, "go_widget") -- current game object --- msg.url(nil, object_url, "go_widget") -- other game object ---@generic T: druid.widget diff --git a/druid/editor_scripts/druid.editor_script b/druid/editor_scripts/druid.editor_script index 96076c5..8086f99 100644 --- a/druid/editor_scripts/druid.editor_script +++ b/druid/editor_scripts/druid.editor_script @@ -23,7 +23,7 @@ end function M.get_commands() return { { - label = "Assign Layers", + label = "[Druid] Assign Layers", locations = { "Edit" }, query = { selection = {type = "resource", cardinality = "one"} }, active = function(opts) @@ -50,7 +50,7 @@ function M.get_commands() }, { - label = "Create Druid Widget", + label = "[Druid] Create Druid Widget", locations = { "Edit", "Assets" }, query = { selection = {type = "resource", cardinality = "one"} }, active = function(opts)