Skip to content

Commit 007992f

Browse files
committed
Fixed error caused by BrowserButtonTemplate being removed
1 parent 44c968c commit 007992f

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

RepHelper.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Interface: 90001
1+
## Interface: 90002
22
## Title: RepHelper
33
## Version: @project-version@
44
## Author: Chawan, Marabon

RepHelper.xml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -783,8 +783,9 @@
783783

784784

785785
<!--> ============================================================================================================== <-->
786-
<Button name="RPH_OptionsButton" parent="ReputationFrame" inherits="BrowserButtonTemplate">
787-
<Size x="27" y="27" />
786+
<Button name="RPH_OptionsButton" parent="ReputationFrame" >
787+
<Size x="26" y="26" />
788+
<HighlightTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Highlight" alphaMode="ADD"/>
788789
<Anchors>
789790
<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" >
790791
<Offset x="-2" y="-22" />
@@ -800,7 +801,21 @@
800801
</Texture>
801802
</Layer>
802803
</Layers>
803-
<Scripts>
804+
<Scripts>
805+
<OnMouseDown>
806+
local point, relativeTo, relativePoint, x, y = self.Icon:GetPoint(1);
807+
self.origX = x;
808+
self.origY = y;
809+
self.Icon:SetPoint(point, relativeTo, relativePoint, x-1, y-1);
810+
</OnMouseDown>
811+
<OnMouseUp>
812+
local point, relativeTo, relativePoint = self.Icon:GetPoint(1);
813+
self.Icon:SetPoint(point, relativeTo, relativePoint, self.origX, self.origY);
814+
</OnMouseUp>
815+
<OnHide>
816+
local point, relativeTo, relativePoint = self.Icon:GetPoint(1);
817+
self.Icon:SetPoint(point, relativeTo, relativePoint, self.origX, self.origY);
818+
</OnHide>
804819
<OnClick>
805820
if(RPH_OptionsFrame:IsVisible()) then
806821
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF);

0 commit comments

Comments
 (0)