diff --git a/docs/objects/Object/disable.md b/docs/objects/Object/disable.md index 6c97de3..b7946f0 100644 --- a/docs/objects/Object/disable.md +++ b/docs/objects/Object/disable.md @@ -1,4 +1,7 @@ +# Object + ## disable + Disables the object's event listeners -This will disable the object. Which means it doesn't listen to any events anymore. \ No newline at end of file +This will disable the object. Which means it doesn't listen to any events anymore. diff --git a/docs/objects/Object/enable.md b/docs/objects/Object/enable.md index f277cb8..17c5824 100644 --- a/docs/objects/Object/enable.md +++ b/docs/objects/Object/enable.md @@ -1,4 +1,7 @@ +# Object + ## enable + Enables the object's event listeners -If the object's is disabled, it will stop listening to incoming events, this will reenable it. \ No newline at end of file +If the object's is disabled, it will stop listening to incoming events, this will reenable it. diff --git a/docs/objects/Object/getAbsolutePosition.md b/docs/objects/Object/getAbsolutePosition.md index aa89388..6874e60 100644 --- a/docs/objects/Object/getAbsolutePosition.md +++ b/docs/objects/Object/getAbsolutePosition.md @@ -1,16 +1,24 @@ +# Object + ## getAbsolutePosition + Converts the relative coordinates into absolute coordinates -#### Parameters: + +### Parameters + 1. `number|nil` x 2. `number|nil` y -#### Returns: +### Returns + 1. `object` The object in use -#### Usage: +### Usage + * Creates a frame and a button and prints the button's absolute position to the debug console + ```lua local mainFrame = basalt.createFrame():setPosition(3,3) local aButton = mainFrame:addButton():setSize(8,1):setPosition(4,2) basalt.debug(aButton:getAbsolutePosition()) -- returns 7,5 (frame coords + own coords) instead of 4,2 -``` \ No newline at end of file +``` diff --git a/docs/objects/Object/getAnchorPosition.md b/docs/objects/Object/getAnchorPosition.md index e335b71..cb275b2 100644 --- a/docs/objects/Object/getAnchorPosition.md +++ b/docs/objects/Object/getAnchorPosition.md @@ -1,16 +1,23 @@ +# Object + ## getAnchorPosition + Converts the x and y coordinates into the anchor coordinates of the object -#### Parameters: +### Parameters + 1. `number|nil` x 2. `number|nil` y, if nothing it uses the object's x, y -#### Returns: +#### Returns + 1. `number` x 2. `number` y -#### Usage: +#### Usage + * Prints the anchor position to the debug console + ```lua local mainFrame = basalt.createFrame():setSize(15,15) local aButton = mainFrame:addButton() @@ -18,4 +25,4 @@ local aButton = mainFrame:addButton() :setSize(8,1) :setPosition(1,1) basalt.debug(aButton:getAnchorPosition()) -- returns 7,14 (framesize - own size) instead of 1,1 -``` \ No newline at end of file +``` diff --git a/docs/objects/Object/getBackground.md b/docs/objects/Object/getBackground.md index 25015f0..4393af5 100644 --- a/docs/objects/Object/getBackground.md +++ b/docs/objects/Object/getBackground.md @@ -1,5 +1,9 @@ +# Object + ## getBackground + Returns the current background color -#### Returns: +### Returns + 1. `number` color diff --git a/docs/objects/Object/getForeground.md b/docs/objects/Object/getForeground.md index 6692aa8..b459fde 100644 --- a/docs/objects/Object/getForeground.md +++ b/docs/objects/Object/getForeground.md @@ -1,5 +1,9 @@ +# Object + ## getForeground + Returns the current foreground color -#### Returns: +### Returns + 1. `number` color diff --git a/docs/objects/Object/getName.md b/docs/objects/Object/getName.md index 7866617..0875c80 100644 --- a/docs/objects/Object/getName.md +++ b/docs/objects/Object/getName.md @@ -1,11 +1,17 @@ +# Object + ## getName + Returns the given name of the object -#### Returns: +### Returns + 1. `string` name -#### Usage: +#### Usage + * Prints name of object to debug window + ```lua local main = basalt.createFrame() basalt.debug(main:getName()) -- returns the uuid @@ -14,4 +20,4 @@ basalt.debug(main:getName()) -- returns the uuid ```lua local main = basalt.createFrame("myFirstMainFrame") basalt.debug(main:getName()) -- returns myFirstMainFrame -``` \ No newline at end of file +``` diff --git a/docs/objects/Object/getPosition.md b/docs/objects/Object/getPosition.md index b4e35e5..1d7ea27 100644 --- a/docs/objects/Object/getPosition.md +++ b/docs/objects/Object/getPosition.md @@ -1,6 +1,10 @@ +# Object + ## getPosition + Returns the object's position -#### Returns: +### Returns + 1. `number` x 2. `number` y diff --git a/docs/objects/Object/getSize.md b/docs/objects/Object/getSize.md index 70ca747..4421d3a 100644 --- a/docs/objects/Object/getSize.md +++ b/docs/objects/Object/getSize.md @@ -1,6 +1,10 @@ +# Object + ## getSize + Returns the object's size -#### Returns: +### Returns + 1. `number` w 2. `number` h diff --git a/docs/objects/Object/getValue.md b/docs/objects/Object/getValue.md index 11eab7b..ce273e9 100644 --- a/docs/objects/Object/getValue.md +++ b/docs/objects/Object/getValue.md @@ -1,12 +1,19 @@ +# Object + ## getValue + Returns the currently saved value -#### Returns: + +### Returns + 1. `any` Object's value -#### Usage: +### Usage + * Prints the value of the checkbox to the debug console + ```lua local mainFrame = basalt.createFrame() local aCheckbox = mainFrame:addCheckbox():setValue(true) basalt.debug(aCheckbox:getValue()) -- returns true -``` \ No newline at end of file +``` diff --git a/docs/objects/Object/hide.md b/docs/objects/Object/hide.md index 5f12ef1..7b271dd 100644 --- a/docs/objects/Object/hide.md +++ b/docs/objects/Object/hide.md @@ -1,15 +1,22 @@ +# Object + ## hide + Hides the object -#### Returns: +### Returns + 1. `object` The object in use -#### Usage: +#### Usage + * Hides a frame + ```lua local mainFrame = basalt.createFrame() local button = mainFrame:addButton():setText("Close"):onClick(function() mainFrame:hide() end) ``` + ```xml