- Embed Methods:
-
JostleLib:GetInstance("version")
- Library Functions:
-
GetScreenTop()
GetScreenBottom()
RegisterTop(frame)
RegisterBottom(frame)
Unregister(frame)
IsTopAdjusting()
EnableTopAdjusting()
DisableTopAdjusting()
IsBottomAdjusting()
EnableBottomAdjusting()
DisableBottomAdjusting()
Refresh([...])
- Embed Methods:
-
- JostleLib:GetInstance("version")
-
- Returns an instance of JostleLib with the specified version. If the version cannot be found, an error occurs.
- Arguments:
-
- ("version")
- "version":
- String - the major version of the library, currently "1.0"
- Returns:
- An instance of JostleLib with the specified version
- Example:
- local jostle = JostleLib:GetInstance("1.0")
- Functions:
-
- GetScreenTop()
-
- Returns the top of the screen, right below the lowest registered top frame.
-
- Arguments:
-
()
- Returns:
-
Number - the top of the screen, right below the lowest registered top frame.
- Example:
- local top = jostle:GetScreenTop()
- GetScreenBottom()
-
- Returns the bottom of the screen, right above the highest registered bottom frame.
-
- Arguments:
-
()
- Returns:
-
Number - the bottom of the screen, right above the highest registered bottom frame.
- Example:
- local bottom = jostle:GetScreenBottom()
- RegisterTop(frame)
-
- Registers a frame to go on the top of the screen.
-
- Arguments:
-
- (frame)
- frame:
- Frame - frame to register.
- Returns:
-
Boolean - true if successful
- Example:
- local success = jostle:RegisterTop(frame)
- RegisterBottom(frame)
-
- Registers a frame to go on the bottom of the screen.
-
- Arguments:
-
- (frame)
- frame:
- Frame - frame to register.
- Returns:
-
Boolean - true if successful
- Example:
- local success = jostle:RegisterBottom(frame)
- Unregister(frame)
-
- Unregisters a frame with JostleLib.
-
- Arguments:
-
- (frame)
- frame:
- Frame - frame to unregister.
- Returns:
-
Boolean - true if successful
- Example:
- local success = jostle:Unregister(frame)
- IsTopAdjusting()
-
- Whether the frames are adjusting with the top.
-
- Arguments:
-
()
- Returns:
-
Boolean - whether the frames are adjusting with the top.
- Example:
- local adjust = jostle:IsTopAdjusting()
- IsBottomAdjusting()
-
- Whether the frames are adjusting with the bottom.
-
- Arguments:
-
()
- Returns:
-
Boolean - whether the frames are adjusting with the bottom.
- Example:
- local adjust = jostle:IsBottomAdjusting()
- EnableTopAdjusting()
-
- Enable the frames to adjust with the top.
-
- Arguments:
-
()
- Returns:
-
nil
- Example:
- jostle:EnableTopAdjusting()
- DisableTopAdjusting()
-
- Disable the frames from adjusting with the top.
-
- Arguments:
-
()
- Returns:
-
nil
- Example:
- jostle:DisableTopAdjusting()
- EnableBottomAdjusting()
-
- Enable the frames to adjust with the bottom.
-
- Arguments:
-
()
- Returns:
-
nil
- Example:
- jostle:EnableBottomAdjusting()
- DisableBottomAdjusting()
-
- Disable the frames from adjusting with the bottom.
-
- Arguments:
-
()
- Returns:
-
nil
- Example:
- jostle:DisableBottomAdjusting()
- Refresh()
-
- Refresh the frames, make sure everything is adjusted.
-
- Arguments:
-
()
- Returns:
-
nil
- Remarks:
-
After calling another method which would change the view, this is called.
In most cases, you will not need to call this.
- Example:
- jostle:Refresh()