Skip to content

Commit

Permalink
Merge branch 'Points' into develop
Browse files Browse the repository at this point in the history
<no random message>
  • Loading branch information
opussf committed Jan 27, 2024
2 parents bea0adf + dc6d306 commit 008ad19
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 4 deletions.
23 changes: 21 additions & 2 deletions buildFiles/build.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<project name="MeToo" default="package">
<!-- version 7.1 -->
<project name="" default="package">
<!-- version 7.3 -->

<tstamp/>
<property file="build.properties"/>
Expand Down Expand Up @@ -136,11 +136,30 @@

<target name="curse" depends="package" description="copy files to a folder for deploy to curseforge">
<property name="curse.dir" location="${ant.project.name}-cf"/>
<exec executable="git" dir="${curse.dir}" failifexecutionfails="true" errorproperty="">
<arg line="reset --hard HEAD" />
</exec>
<copy todir="${curse.dir}">
<fileset dir="${package.dir}"/>
</copy>
<exec executable="git" dir="${curse.dir}" failifexecutionfails="true" errorproperty="">
<arg line="status" />
</exec>
<fail message="Not a tagged release.">
<condition>
<not>
<equals arg1="${version.number}" arg2="${git.tag}"/>
</not>
</condition>
</fail>
<exec executable="git" dir="${curse.dir}" failifexecutionfails="true" errorproperty="">
<arg line="add ." />
</exec>
<exec executable="git" dir="${curse.dir}" failifexecutionfails="true" errorproperty="">
<arg line="commit -a -m '${git.tag}'" />
</exec>
<exec executable="git" dir="${curse.dir}" failifexecutionfails="true" errorproperty="">
<arg line="tag -a ${git.tag} -m '${git.tag}'" />
</exec>
</target>
</project>
7 changes: 5 additions & 2 deletions src/wowStubs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,12 @@ ITEM_BIND_ON_PICKUP="Binds when picked up"
Frame = {
["__isShown"] = true,
["Events"] = {},
["points"] = {},
["Hide"] = function( self ) self.__isShown = false; end,
["Show"] = function( self ) self.__isShown = true; end,
["IsVisible"] = function( self ) return( self.__isShown ) end,
["RegisterEvent"] = function(self, event) self.Events[event] = true; end,
["SetPoint"] = function() end,
["SetPoint"] = function(self, ... ) table.insert( self.points, {...} ); end,
["UnregisterEvent"] = function(self, event) self.Events[event] = nil; end,
["GetName"] = function(self) return self.framename end,
["SetFrameStrata"] = function() end,
Expand All @@ -399,7 +400,9 @@ Frame = {
["GetHeight"] = function(self) return( self.height ); end,
["CreateFontString"] = function(self, ...) return(CreateFontString(...)) end,
["SetSize"] = function(self, x, y) end,
["ClearAllPoints"] = function(self) end,
["ClearAllPoints"] = function(self) self.points={}; end,
["GetPoint"] = function(self) end,
["GetNumPoints"] = 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
17 changes: 17 additions & 0 deletions test/test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,23 @@ function test.notestStub_Frame_rightFrameIsHidden()
assertTrue( frame2:IsVisible() )
assertFalse( frame1:IsVisible() )
end
function test.testStub_Frame_ClearAllPoints()
-- https://wowwiki-archive.fandom.com/wiki/API_Region_SetPoint
frame0 = CreateFrame("frame0")
frame = CreateFrame("frame")
frame.points = {{"TOP", frame0, "TOP", 0, 0}}
frame:ClearAllPoints()
assertEquals( 0, #frame.points )
end
function test.testStub_Frame_SetPoint_noOffset()
frame0 = CreateFrame("frame0")
frame = CreateFrame("frame")
frame:ClearAllPoints()
frame:SetPoint("BOTTOMLEFT", "frame0", "BOTTOMLEFT")
assertEquals( "BOTTOMLEFT", frame.points[1][1] )
--assertEquals( "$parent", frame.points[1][2]:GetName() )
assertEquals( "BOTTOMLEFT", frame.points[1][3] )
end

-----
----- Connected realm relationship
Expand Down

0 comments on commit 008ad19

Please sign in to comment.