Skip to content

Commit 4d61437

Browse files
committed
Updated docs
There is still stuff to do
1 parent 53d7b9f commit 4d61437

File tree

207 files changed

+3862
-3779
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

207 files changed

+3862
-3779
lines changed

Basalt/objects/Animation.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ return function(name)
143143
if(typ~=nil)then
144144
if(activeAnimations[typ]==nil)then activeAnimations[typ] = {} end
145145
if(activeAnimations[typ][name]~=nil)then
146-
activeAnimations[typ][name]:cancel()
146+
if(activeAnimations[typ][name]~=self)then
147+
activeAnimations[typ][name]:cancel()
148+
end
147149
end
148150
activeAnimations[typ][name] = self
149151
end

docs/_sidebar.md

+23-28
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,28 @@
33
- [Quick Start](home/Quick-Start.md)
44
- [Installer](home/installer)
55
- Objects
6-
- [Basalt](objects/Basalt)
7-
- [Object](objects/Object)
8-
- [Button](objects/Button)
9-
- [Checkbox](objects/Checkbox)
10-
- [Dropdown](objects/Dropdown)
11-
- [Frame](objects/Frame)
12-
- [Image](objects/Image)
13-
- [Input](objects/Input)
14-
- [Label](objects/Label)
15-
- [List](objects/List)
16-
- [Menubar](objects/Menubar)
17-
- [Pane](objects/Pane)
18-
- [Program](objects/Program)
19-
- [Progressbar](objects/Progressbar)
20-
- [Radio](objects/Radio)
21-
- [Scrollbar](objects/Scrollbar)
22-
- [Slider](objects/Slider)
23-
- [Textfield](objects/Textfield)
6+
- [Basalt](objects/Basalt.md)
7+
- [Object](objects/Object.md)
8+
- [Button](objects/Button.md)
9+
- [Checkbox](objects/Checkbox.md)
10+
- [Dropdown](objects/Dropdown.md)
11+
- [Frame](objects/Frame.md)
12+
- [Image](objects/Image.md)
13+
- [Input](objects/Input.md)
14+
- [Label](objects/Label.md)
15+
- [List](objects/List.md)
16+
- [Menubar](objects/Menubar.md)
17+
- [Pane](objects/Pane.md)
18+
- [Program](objects/Program.md)
19+
- [Progressbar](objects/Progressbar.md)
20+
- [Radio](objects/Radio.md)
21+
- [Scrollbar](objects/Scrollbar.md)
22+
- [Slider](objects/Slider.md)
23+
- [Textfield](objects/Textfield.md)
2424
- [Animation](objects/Animation.md)
25-
- [Thread](objects/Thread)
26-
- [Timer](objects/Timer)
27-
- Events
28-
- [Mouse Events](events/mouseEvents.md)
29-
- [Keyboard Events](events/keyEvents.md)
30-
- [Other Events](events/otherEvents.md)
25+
- [Thread](objects/Thread.md)
26+
- [Timer](objects/Timer.md)
3127
- Tips & Tricks
32-
- [Component Logic](tips/logic)
33-
- [Changing Button Color](tips/buttons)
34-
- [Advanced usage of Events](tips/events.md)
35-
- [Example Designs](tips/design.md)
28+
- [Your Logic](tips/logic.md)
29+
- [Button coloring](tips/buttonColoring.md)
30+
- [Designing/Animating](tips/design.md)

docs/events/keyEvents.md

-39
This file was deleted.

docs/events/mouseEvents.md

-82
This file was deleted.

docs/events/otherEvents.md

-79
This file was deleted.

docs/home/Quick-Start.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,14 @@ Here is a fully functioning example of Basalt code
4545
```lua
4646
local basalt = require("basalt") --> Load the Basalt framework
4747

48-
--> Create a base frame. Please note that Basalt needs at least one active base frame to properly supply events
49-
local mainFrame = basalt.createFrame()
48+
--> Create the first frame. Please note that Basalt needs at least one active "non-parent" frame to properly supply events
49+
--> When Basalt#createFrame makes use of unique identifiers (commonly referred to as UIDs), meaning that the supplied value must be UNIQUE
50+
local mainFrame = basalt.createFrame("mainFrame")
5051

52+
--> Show the frame to the user
53+
mainFrame:show()
5154

52-
local button = mainFrame:addButton() --> Add a button to the mainFrame
55+
local button = mainFrame:addButton("clickableButton") --> Add a button to the mainFrame (With a unique identifier)
5356

5457
--> Set the position of the button, Button#setPosition follows an x, y pattern.
5558
--> The x value is how far right the object should be from its anchor (negative values from an anchor will travel left)
@@ -66,21 +69,24 @@ end
6669
--> Make sure the button knows which function to call when it's clicked
6770
button:onClick(buttonClick)
6871

72+
button:show() --> Make the button visible, so the user can click it
73+
6974
basalt.autoUpdate() --> Basalt#autoUpdate starts the event listener to detect user input
7075
```
7176
If you're like us and strive for succinct and beautiful code, here is a cleaner implementation of the code above:
7277
```lua
7378
local basalt = require("basalt")
7479

75-
local mainFrame = basalt.createFrame()
80+
local mainFrame = basalt.createFrame("mainFrame"):show()
7681
local button = mainFrame --> Basalt returns an instance of the object on most methods, to make use of "call-chaining"
77-
:addButton() --> This is an example of call chaining
82+
:addButton("clickableButton") --> This is an example of call chaining
7883
:setPosition(4,4)
7984
:setText("Click me!")
8085
:onClick(
8186
function()
8287
basalt.debug("I got clicked!")
8388
end)
89+
:show()
8490

8591
basalt.autoUpdate()
8692
```

0 commit comments

Comments
 (0)