diff --git a/discord/credits.json b/discord/credits.json new file mode 100644 index 0000000..6df4528 --- /dev/null +++ b/discord/credits.json @@ -0,0 +1,6 @@ +{ + "name": "Discord", + "author": "Sammy (1Turtle)", + "description": "Made in request for RaiTaki" + } + \ No newline at end of file diff --git a/discord/discord.bimg b/discord/discord.bimg new file mode 100644 index 0000000..de80597 --- /dev/null +++ b/discord/discord.bimg @@ -0,0 +1 @@ +{{{"������","FFFFFF","FFFFFF",},{"������","FFF0FF","F00F0F",},{"������","FF0F0F","F0F0FF",},{"������","FFFFFF","FFFFFF",},},["creator"]="BIMG Generator 10.0",["palette"]={[0]={0,},{16777215,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},},["version"]="1.0.0",} \ No newline at end of file diff --git a/discord/index.lua b/discord/index.lua new file mode 100644 index 0000000..2fee0bc --- /dev/null +++ b/discord/index.lua @@ -0,0 +1,34 @@ +local ctx = ({ ... })[1] +local base = ({ ... })[2] +local basalt = ctx.basalt + +local index = base:addFrame("_app") + :setSize("parent.w","parent.h") + :addLayout(fs.combine(ctx.path.page, "index.xml")) + +local head = index:getDeepObject("_head") +local name = ctx.config.discordTag or "ctx.config.discordTag" +local discord = head:addImage() + :setPosition("parent.w/2-self.w/2-"..((#name)/2-1),4) + :setSize(8, 6) + :loadImage(fs.combine(ctx.path.page, "discord.bimg")) +local dctag = head:addLabel() + :setText(name) + :setPosition("parent.w/2-self.w/2+4",6) + +local palette = { + ["black"] = 0x202124, + ["blue"] = 0x5662F6, + ["gray"] = 0x282828, + ["lightGray"] = 0xBFBFBF, + ["white"] = 0xFFFFFF, +} + +local mon = peripheral.wrap(ctx.config.monSide) +if mon then + for color, code in pairs(palette) do + mon.setPaletteColor(colors[color], code) + end +end + +return index \ No newline at end of file diff --git a/discord/index.xml b/discord/index.xml new file mode 100644 index 0000000..8f8e06e --- /dev/null +++ b/discord/index.xml @@ -0,0 +1,14 @@ + + + +