Skip to content

Commit

Permalink
Allow to programatically set a window to dock #92
Browse files Browse the repository at this point in the history
  • Loading branch information
flamendless committed Aug 25, 2021
1 parent fe341d5 commit 729b1d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
10 changes: 5 additions & 5 deletions API.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ SOFTWARE.
--]]

if SLAB_PATH == nil then
SLAB_PATH = (...):match("(.-)[^%.]+$")
SLAB_PATH = (...):match("(.-)[^%.]+$")
end

SLAB_FILE_PATH = debug.getinfo(1, 'S').source:match("^@(.+)/")
Expand Down Expand Up @@ -1368,10 +1368,10 @@ end
SubY: [Number] The Y-coordinate used inside the given image.
SubW: [Number] The width used inside the given image.
SubH: [Number] The height used insided the given image.
WrapX: [String] The horizontal wrapping mode for this image. The available options are 'clamp', 'repeat',
WrapX: [String] The horizontal wrapping mode for this image. The available options are 'clamp', 'repeat',
'mirroredrepeat', and 'clampzero'. For more information refer to the Love2D documentation on wrap modes at
https://love2d.org/wiki/WrapMode.
WrapY: [String] The vertical wrapping mode for this image. The available options are 'clamp', 'repeat',
WrapY: [String] The vertical wrapping mode for this image. The available options are 'clamp', 'repeat',
'mirroredrepeat', and 'clampzero'. For more information refer to the Love2D documentation on wrap modes at
https://love2d.org/wiki/WrapMode.
UseOutline: [Boolean] If set to true, a rectangle will be drawn around the given image. If 'SubW' or 'SubH' are specified, these
Expand Down Expand Up @@ -1836,7 +1836,7 @@ end
--[[
GetMousePositionWindow
Retrieves the current mouse position within the current window. This position will include any transformations
Retrieves the current mouse position within the current window. This position will include any transformations
added to the window such as scrolling.
Return: [Number], [Number] The X and Y coordinates of the mouse position within the window.
Expand Down Expand Up @@ -2242,7 +2242,7 @@ end
Id: [String] The Id of this layout.
Options: [Table] List of options that control how this layout behaves.
AlignX: [String] Defines how the controls should be positioned horizontally in the window. The available options are
AlignX: [String] Defines how the controls should be positioned horizontally in the window. The available options are
'left', 'center', or 'right'. The default option is 'left'.
AlignY: [String] Defines how the controls should be positioned vertically in the window. The available options are
'top', 'center', or 'bottom'. The default option is 'top'. The top is determined by the current cursor position.
Expand Down
4 changes: 0 additions & 4 deletions Internal/UI/Window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1139,10 +1139,6 @@ end

function Window.ToDock(Type)
local ActiveInstance = GetInstance()
local MovingInstance = Window.GetMovingInstance()
if MovingInstance and MovingInstance == ActiveInstance then
return
end
Dock.SetPendingWindow(ActiveInstance, Type)
Dock.Override()
end
Expand Down

0 comments on commit 729b1d9

Please sign in to comment.