mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 10:27:47 +02:00
Update
This commit is contained in:
parent
0972c53c70
commit
60ef641276
@ -1,6 +1,3 @@
|
|||||||
--- @license MIT, Insality 2021
|
|
||||||
--- @source https://github.com/Insality/druid
|
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
|
||||||
@ -27,18 +24,12 @@ function M.get_commands()
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
label = "Assign Layers",
|
label = "Assign Layers",
|
||||||
|
locations = { "Edit" },
|
||||||
locations = {"Edit"},
|
query = { selection = {type = "resource", cardinality = "one"} },
|
||||||
|
|
||||||
query = {
|
|
||||||
selection = {type = "resource", cardinality = "one"}
|
|
||||||
},
|
|
||||||
|
|
||||||
active = function(opts)
|
active = function(opts)
|
||||||
local path = editor.get(opts.selection, "path")
|
local path = editor.get(opts.selection, "path")
|
||||||
return ends_with(path, ".gui")
|
return ends_with(path, ".gui")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
run = function(opts)
|
run = function(opts)
|
||||||
local file = opts.selection
|
local file = opts.selection
|
||||||
print("Run script for", editor.get(file, "path"))
|
print("Run script for", editor.get(file, "path"))
|
||||||
@ -60,18 +51,12 @@ function M.get_commands()
|
|||||||
|
|
||||||
{
|
{
|
||||||
label = "Create Druid Component",
|
label = "Create Druid Component",
|
||||||
|
locations = { "Edit", "Assets" },
|
||||||
locations = {"Edit"},
|
query = { selection = {type = "resource", cardinality = "one"} },
|
||||||
|
|
||||||
query = {
|
|
||||||
selection = {type = "resource", cardinality = "one"}
|
|
||||||
},
|
|
||||||
|
|
||||||
active = function(opts)
|
active = function(opts)
|
||||||
local path = editor.get(opts.selection, "path")
|
local path = editor.get(opts.selection, "path")
|
||||||
return ends_with(path, ".gui")
|
return ends_with(path, ".gui")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
run = function(opts)
|
run = function(opts)
|
||||||
local file = opts.selection
|
local file = opts.selection
|
||||||
print("Run script for", editor.get(file, "path"))
|
print("Run script for", editor.get(file, "path"))
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
local helper = require("druid.helper")
|
local helper = require("druid.helper")
|
||||||
local component = require("druid.component")
|
local component = require("druid.component")
|
||||||
|
|
||||||
---@alias druid.layout.mode
|
---@alias druid.layout.mode "horizontal"|"vertical"|"horizontal_wrap"
|
||||||
---| "horizontal" Elements are placed horizontally
|
|
||||||
---| "vertical" Elements are placed vertically
|
|
||||||
---| "horizontal_wrap" Elements are placed horizontally, but if the row width is greater than the parent width, the next row is created
|
|
||||||
|
|
||||||
---@class druid.layout.row_data
|
---@class druid.layout.row_data
|
||||||
---@field width number
|
---@field width number
|
||||||
|
Loading…
x
Reference in New Issue
Block a user