diff --git a/docs/objects/MovableFrame.md b/docs/objects/MovableFrame.md index 796f678..ea8ebd3 100644 --- a/docs/objects/MovableFrame.md +++ b/docs/objects/MovableFrame.md @@ -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. diff --git a/docs/objects/MovableFrame/getDraggingMap.md b/docs/objects/MovableFrame/getDraggingMap.md new file mode 100644 index 0000000..bf4bd86 --- /dev/null +++ b/docs/objects/MovableFrame/getDraggingMap.md @@ -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 +``` diff --git a/docs/objects/MovableFrame/setDraggingMap.md b/docs/objects/MovableFrame/setDraggingMap.md new file mode 100644 index 0000000..71fb6b0 --- /dev/null +++ b/docs/objects/MovableFrame/setDraggingMap.md @@ -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} +}) +``` diff --git a/docs/objects/ScrollableFrame/setDirection.md b/docs/objects/ScrollableFrame/setDirection.md new file mode 100644 index 0000000..b1fcd38 --- /dev/null +++ b/docs/objects/ScrollableFrame/setDirection.md @@ -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") +``` diff --git a/docs/objects/Scrollbar/setBackgroundSymbol.md b/docs/objects/Scrollbar/setBackgroundSymbol.md index 1665aa4..eae6093 100644 --- a/docs/objects/Scrollbar/setBackgroundSymbol.md +++ b/docs/objects/Scrollbar/setBackgroundSymbol.md @@ -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 -``` \ No newline at end of file +```