Skip to content

Commit

Permalink
Allow the user to reset the position (and size) of the UI List.
Browse files Browse the repository at this point in the history
One of the great things about books is sometimes there are fantastic pictures.
  • Loading branch information
opussf committed Oct 27, 2023
1 parent 849e1c2 commit 42b4023
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/INEEDUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,12 @@ end
function INEED.UIListOnDragStop()
INEEDUIListFrame:StopMovingOrSizing()
end
function INEED.UIReset()
INEEDUIListFrame:SetSize( 250, 12 )
INEEDUIListFrame:ClearAllPoints()
INEEDUIListFrame:SetPoint("CENTER", "$parent", "CENTER")
end
INEED.CommandList["reset"] = {
["func"] = INEED.UIReset,
["help"] = {"", "Reset the position of the UI"},
}
2 changes: 2 additions & 0 deletions test/wowStubs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ Frame = {
["SetHeight"] = function(self, value) self.height = value; end,
["GetHeight"] = function(self) return( self.height ); end,
["CreateFontString"] = function(self, ...) return(CreateFontString(...)) end,
["SetSize"] = function(self, x, y) end,
["ClearAllPoints"] = function(self) end,

["SetMinMaxValues"] = function(self, min, max) self.min=min; self.max=max; end,
["SetValue"] = function(self, value) self.value=value end,
Expand Down

0 comments on commit 42b4023

Please sign in to comment.