Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Insality committed Nov 2, 2024
1 parent 0972c53 commit 60ef641
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 23 deletions.
23 changes: 4 additions & 19 deletions druid/editor_scripts/druid.editor_script
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
--- @license MIT, Insality 2021
--- @source https://github.com/Insality/druid

local M = {}


Expand All @@ -27,18 +24,12 @@ function M.get_commands()
return {
{
label = "Assign Layers",

locations = {"Edit"},

query = {
selection = {type = "resource", cardinality = "one"}
},

locations = { "Edit" },
query = { selection = {type = "resource", cardinality = "one"} },
active = function(opts)
local path = editor.get(opts.selection, "path")
return ends_with(path, ".gui")
end,

run = function(opts)
local file = opts.selection
print("Run script for", editor.get(file, "path"))
Expand All @@ -60,18 +51,12 @@ function M.get_commands()

{
label = "Create Druid Component",

locations = {"Edit"},

query = {
selection = {type = "resource", cardinality = "one"}
},

locations = { "Edit", "Assets" },
query = { selection = {type = "resource", cardinality = "one"} },
active = function(opts)
local path = editor.get(opts.selection, "path")
return ends_with(path, ".gui")
end,

run = function(opts)
local file = opts.selection
print("Run script for", editor.get(file, "path"))
Expand Down
5 changes: 1 addition & 4 deletions druid/extended/layout.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
local helper = require("druid.helper")
local component = require("druid.component")

---@alias druid.layout.mode
---| "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
---@alias druid.layout.mode "horizontal"|"vertical"|"horizontal_wrap"

---@class druid.layout.row_data
---@field width number
Expand Down

0 comments on commit 60ef641

Please sign in to comment.