mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-21 05:06:29 +00:00
Revamp UI using Kenney UI assets
This commit is contained in:
52
plugin/src/Assets.lua
Normal file
52
plugin/src/Assets.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
local sheetAsset = "rbxassetid://2738712459"
|
||||
|
||||
local Assets = {
|
||||
Sprites = {
|
||||
WhiteCross = {
|
||||
asset = sheetAsset,
|
||||
offset = Vector2.new(190, 318),
|
||||
size = Vector2.new(18, 18),
|
||||
},
|
||||
},
|
||||
Slices = {
|
||||
GrayBox = {
|
||||
asset = sheetAsset,
|
||||
offset = Vector2.new(148, 433),
|
||||
size = Vector2.new(36, 36),
|
||||
center = Rect.new(8, 8, 9, 9),
|
||||
},
|
||||
GrayButton02 = {
|
||||
asset = sheetAsset,
|
||||
offset = Vector2.new(0, 98),
|
||||
size = Vector2.new(190, 45),
|
||||
center = Rect.new(16, 16, 17, 17),
|
||||
},
|
||||
GrayButton07 = {
|
||||
asset = sheetAsset,
|
||||
offset = Vector2.new(195, 0),
|
||||
size = Vector2.new(49, 49),
|
||||
center = Rect.new(16, 16, 17, 17),
|
||||
},
|
||||
},
|
||||
StartSession = "",
|
||||
SessionActive = "",
|
||||
Configure = "",
|
||||
}
|
||||
|
||||
local function guardForTypos(name, map)
|
||||
setmetatable(map, {
|
||||
__index = function(_, key)
|
||||
error(("%q is not a valid member of %s"):format(tostring(key), name), 2)
|
||||
end
|
||||
})
|
||||
|
||||
for key, child in pairs(map) do
|
||||
if type(child) == "table" then
|
||||
guardForTypos(("%s.%s"):format(name, key), child)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
guardForTypos("Assets", Assets)
|
||||
|
||||
return Assets
|
||||
Reference in New Issue
Block a user