Skip to content
This repository was archived by the owner on Dec 11, 2024. It is now read-only.

Commit b545758

Browse files
authored
Create init.lua
1 parent f7e2ea2 commit b545758

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

src/init.lua

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--[[
2+
A modern solution to get Explorer class icons with ease.
3+
Created by break-core
4+
]]
5+
6+
return function(className: string, iconSize: number, studioTheme: "Light" | "Dark"): string
7+
--- Variables
8+
className = className
9+
iconSize = iconSize
10+
studioTheme = studioTheme
11+
12+
if className then
13+
--- Get the default sized icon
14+
if iconSize == 1 then
15+
return `rbxasset://studio_svg_textures/Shared/InsertableObjects/{studioTheme}/Standard/{className}.png`
16+
-- Get the 2x or 3x icon
17+
elseif iconSize == 2 or 3 then
18+
return `rbxasset://studio_svg_textures/Shared/InsertableObjects/{studioTheme}/Standard/{className}@{iconSize}x.png`
19+
end
20+
end
21+
end

0 commit comments

Comments
 (0)