From 2e11c99ef2e0d78011d4d910efeab166759cb31a Mon Sep 17 00:00:00 2001 From: Erlend <49862976+Erb3@users.noreply.github.com> Date: Sat, 4 Jun 2022 19:17:32 +0200 Subject: [PATCH 1/4] Update Home.md with new links, ++ I updated Home.md with new links to the new repo. I also rephrased some things. --- docs/Home.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/Home.md b/docs/Home.md index 7066497..52cb1ea 100644 --- a/docs/Home.md +++ b/docs/Home.md @@ -1,24 +1,24 @@ -# Welcome to The Basalt Wiki!
+# Welcome to The Basalt Wiki! -_Note: The Basalt Wiki is a work in progress. Please treat Wiki errors the same as bugs and report them accordingly._ +*Note: The Basalt Wiki is a work in progress. Please treat Wiki errors the same as bugs and report them accordingly.* Here you can find information about how to use Basalt as well as examples of functional Basalt code. The aim of Basalt is to improve user interaction through visual display. ## About Basalt -Basalt is intended to be an easy-to-understand UI Framework designed for CC:Tweaked (AKA Computer Craft: Tweaked) - a popular minecraft mod. For more information about CC:Tweaked, checkout the project's home page. -

+Basalt is intended to be an easy-to-understand UI Framework designed for CC:Tweaked (Also know as "ComputerCraft: Tweaked") - a popular minecraft mod. For more information about CC:Tweaked, checkout the project's [wiki](https://tweaked.cc/) or [download](https://www.curseforge.com/minecraft/mc-mods/cc-tweaked). ## Quick Demo ![Preview](https://media0.giphy.com/media/fvmNPshXKeU7FFA9iA/giphy.gif) -

## Questions & Bugs -Obviously I've implemented some easter eggs, _some people_ call them "bugs". If you happen to discover one of these just make a new issue. +Obviously NyoriE has implemented some easter eggs, *some people* call them "bugs". If you happen to discover one of these just make a new issue. -Additionally, if you have questions about Basalt or how to make use of it, feel free to create a new discussion on Basalt's Discussion Board. +Additionally, if you have questions about Basalt or how to make use of it, feel free to create a new discussion on Basalt's Discussion Board, or ask in our [discord](https://discord.gg/yNNnmBVBpE). -You may also message me on Discord: NyoriE#8206 +--- + +Feel free to join our [discord](https://discord.gg/yNNnmBVBpE)!

\ No newline at end of file -- 2.49.1 From 3cfc2fca9c5c1fa81126375d5361bd97dffb4f69 Mon Sep 17 00:00:00 2001 From: Erlend <49862976+Erb3@users.noreply.github.com> Date: Sat, 4 Jun 2022 19:19:41 +0200 Subject: [PATCH 2/4] Remove unused file --- docs/home/gettingStarted.md | 71 ------------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 docs/home/gettingStarted.md diff --git a/docs/home/gettingStarted.md b/docs/home/gettingStarted.md deleted file mode 100644 index b470a31..0000000 --- a/docs/home/gettingStarted.md +++ /dev/null @@ -1,71 +0,0 @@ -# Getting Started! - -Basalt aims to be a relatively small, easy to use framework. - -Accordingly, we have provided an installation script. - - -Just use the following command in any CC:Tweaked shell: - -`wget https://github.com/Pyroxenium/Basalt/raw/master/basalt.lua basalt.lua` - -This will download `basalt.lua` to your local directory. - -To load the framework, make use of the following snippet: -````lua ---> For those who are unfamiliar with lua, dofile executes the code in the referenced file -local basalt = dofile("basalt.lua") -```` - - -Here is a fully functioning example of Basalt code: - -````lua -local basalt = dofile("basalt.lua") --> Load the Basalt framework - ---> Create the first frame. Please note that Basalt needs at least one active "non-parent" frame to properly supply events ---> When Basalt#createFrame makes use of unique identifiers (commonly referred to as UIDs), meaning that the supplied value must be UNIQUE ---> If the supplied UID is ambiguous, Basalt#createFrame returns a nil value -local mainFrame = basalt.createFrame("mainFrame") - ---> Show the frame to the user -mainFrame:show() - -local button = mainFrame:addButton("clickableButton") --> Add a button to the mainFrame (With a unique identifier) - ---> Set the position of the button, Button#setPosition follows an x, y pattern. ---> The x value is how far right the object should be from its anchor (negative values from an anchor will travel left) ---> The y value is how far down the object should be from its anchor (negative values from an anchor will travel up) -button:setPosition(4, 4) - -button:setText("Click me!") --> Set the text of our button - -local function buttonClick() --> This function serves as our click logic - basalt.debug("I got clicked!") -end - ---> Remember! You cannot supply buttonClick(), that will only supply the result of the function ---> Make sure the button knows which function to call when it's clicked -button:onClick(buttonClick) - -button:show() --> Make the button visible, so the user can click it - -basalt.autoUpdate() --> Basalt#autoUpdate starts the event listener to detect user input -```` -If you're like us and strive for succinct and beautiful code, here is a cleaner implementation of the code above: -````lua -local basalt = dofile("basalt.lua") - -local mainFrame = basalt.createFrame("mainFrame"):show() -local button = mainFrame --> Basalt returns an instance of the object on most methods, to make use of "call-chaining" - :addButton("clickableButton") --> This is an example of call chaining - :setPosition(4,4) - :setText("Click me!") - :onClick( - function() - basalt.debug("I got clicked!") - end) - :show() - -basalt.autoUpdate() -```` -- 2.49.1 From 038bab11bafec978b8b2669189a1492a422315f3 Mon Sep 17 00:00:00 2001 From: Erlend <49862976+Erb3@users.noreply.github.com> Date: Sat, 4 Jun 2022 19:20:15 +0200 Subject: [PATCH 3/4] Remove sidebar listing for something that dosent exist --- docs/_sidebar.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 277d1f4..71711ea 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -28,4 +28,3 @@ - Tips & Tricks - [Component Logic](tips/logic) - [Changing Button Color](tips/buttons) - - [Design Tips](tips/design.md) -- 2.49.1 From 1c7f465cd8960e363590203333aa2bcc52323555 Mon Sep 17 00:00:00 2001 From: Erlend <49862976+Erb3@users.noreply.github.com> Date: Sat, 4 Jun 2022 19:29:41 +0200 Subject: [PATCH 4/4] Using tweaked.cc instead of deprecated computercraft.info link --- docs/tips/logic.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tips/logic.md b/docs/tips/logic.md index 80a5b6d..29857db 100644 --- a/docs/tips/logic.md +++ b/docs/tips/logic.md @@ -18,7 +18,7 @@ end parallel.waitForAll(basalt.autoUpdate, yourCustomHandler) -- here it will handle your function (yourCustomHandler) and basalts handlers at the time ```` -You can read [here](http://www.computercraft.info/wiki/Parallel_(API)) what exactly parallel.waitForAll() does +You can read [here (tweaked.cc)](https://tweaked.cc/module/parallel.html) what exactly parallel.waitForAll() does ## Method 2: Using threads -- 2.49.1