Small Docs Update
This commit is contained in:
@@ -4,7 +4,7 @@ In addition to the methods inherited from Frame, Container, VisualObject and Obj
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
|[setDraggingMap](objects/MovableFrame/getOffset.md)|Creates a small XY map for the areas where the MovableFrame can be dragged with the mouse
|
||||
|[setDraggingMap](objects/MovableFrame/setDraggingMap.md)|Creates a small XY map for the areas where the MovableFrame can be dragged with the mouse
|
||||
|[getDraggingMap](objects/MovableFrame/getDraggingMap.md)|Returns the current dragging map of the MovableFrame
|
||||
|
||||
These methods allow you to define the specific areas within the MovableFrame where it can be dragged and moved, providing flexibility and control over user interactions with your interface.
|
||||
|
||||
27
docs/objects/MovableFrame/getDraggingMap.md
Normal file
27
docs/objects/MovableFrame/getDraggingMap.md
Normal file
@@ -0,0 +1,27 @@
|
||||
## getDraggingMap
|
||||
|
||||
### Description
|
||||
|
||||
Returns the current dragging map of the MovableFrame object. The dragging map is used to control which part of the MovableFrame can be used to drag and move the frame.
|
||||
|
||||
### Returns
|
||||
|
||||
1. `table` draggingMap - A table containing tables containing the dragging map information. The table should have the following keys:
|
||||
* `x1` (number): The starting x-coordinate of the draggable area.
|
||||
* `y1` (number): The starting y-coordinate of the draggable area.
|
||||
* `x2` (number): The ending x-coordinate of the draggable area.
|
||||
* `y2` (number): The ending y-coordinate of the draggable area.
|
||||
|
||||
### Usage
|
||||
|
||||
* Get the dragging map for a MovableFrame
|
||||
|
||||
```lua
|
||||
local main = basalt.createFrame()
|
||||
local movableFrame = main:addMovableFrame():setSize(10, 5)
|
||||
|
||||
local draggingMap = movableFrame:getDraggingMap()
|
||||
for k,v in pairs(draggingMap)do
|
||||
basalt.debug("Dragging Map "..k..": x1=" .. v.x1 .. ", y1=" .. v.y1 .. ", x2=" .. v.x2 .. ", y2=" .. v.y2)
|
||||
end
|
||||
```
|
||||
29
docs/objects/MovableFrame/setDraggingMap.md
Normal file
29
docs/objects/MovableFrame/setDraggingMap.md
Normal file
@@ -0,0 +1,29 @@
|
||||
## setDraggingMap
|
||||
|
||||
### Description
|
||||
|
||||
Sets the dragging map for the MovableFrame object. The dragging map is used to control which part of the MovableFrame can be used to drag and move the frame.
|
||||
|
||||
### Parameters
|
||||
|
||||
1. `table` draggingMap - A table containing tables containing the dragging map information. The table should have the following keys:
|
||||
* `x1` (number): The starting x-coordinate of the draggable area.
|
||||
* `y1` (number): The starting y-coordinate of the draggable area.
|
||||
* `x2` (number): The ending x-coordinate of the draggable area.
|
||||
* `y2` (number): The ending y-coordinate of the draggable area.
|
||||
|
||||
### Returns
|
||||
|
||||
1. `object` The object in use
|
||||
|
||||
### Usage
|
||||
|
||||
* Set the dragging map for a MovableFrame
|
||||
|
||||
```lua
|
||||
local main = basalt.createFrame()
|
||||
local movableFrame = main:addMovableFrame():setSize(10, 5)
|
||||
movableFrame:addDraggingMap({
|
||||
{x1 = 0, y1 = 0, x2 = 10, y2 = 5}
|
||||
})
|
||||
```
|
||||
24
docs/objects/ScrollableFrame/setDirection.md
Normal file
24
docs/objects/ScrollableFrame/setDirection.md
Normal file
@@ -0,0 +1,24 @@
|
||||
## setDirection
|
||||
|
||||
### Description
|
||||
|
||||
Sets the scrolling direction of the ScrollableFrame object. The direction can be either "vertical" or "horizontal", which determines how the content inside the ScrollableFrame can be scrolled.
|
||||
|
||||
### Parameters
|
||||
|
||||
1. `string` direction - The scrolling direction to set. Valid values are "vertical" and "horizontal".
|
||||
|
||||
### Returns
|
||||
|
||||
1. `object` The object in use
|
||||
|
||||
### Usage
|
||||
|
||||
* Set the scrolling direction for a ScrollableFrame
|
||||
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame()
|
||||
local scrollableFrame = mainFrame:addScrollableFrame()
|
||||
|
||||
scrollableFrame:setDirection("horizontal")
|
||||
```
|
||||
@@ -1,18 +1,26 @@
|
||||
## setBackgroundSymbol
|
||||
|
||||
### Description
|
||||
|
||||
Changes the symbol in the background, default is "\127"
|
||||
|
||||
#### Parameters:
|
||||
### Parameters
|
||||
|
||||
1. `string` symbol
|
||||
|
||||
#### Returns:
|
||||
### Return
|
||||
|
||||
1. `object` The object in use
|
||||
|
||||
#### Usage:
|
||||
### Usage
|
||||
|
||||
* Creates a new scrollbar and changes the background symbol to X
|
||||
|
||||
```lua
|
||||
local main = basalt.createFrame()
|
||||
local scrollbar = main:addScrollbar():setBackgroundSymbol("X")
|
||||
```
|
||||
|
||||
```xml
|
||||
<scrollbar backgroundSymbol="X" />
|
||||
```
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user