Files
OctoLatency/OctoLatency.xml
T
kompolompoandClaude Sonnet 5 49992fc804 Fix stuck drag on off-frame mouse-up, add error logging and slash commands
- Remove dead VARIABLES_LOADED registration (no handler existed for it)
- Extract OctoLatency_StopMoving and call it from OnHide too, so a drag
  can't get stuck if OnMouseUp never fires on the frame
- Wrap tooltip/update/login handlers in pcall, logging failures to
  OctoLatencyDB.errorLog instead of raising a Lua error popup
- Add /octolat errors and /octolat clearerrors slash commands
- Update README with a short explanation of the addon and its options

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-05 11:41:42 +02:00

60 lines
1.6 KiB
XML

<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Script file="OctoLatency.lua"/>
<Frame name="OctoLatencyFrame" parent="UIParent" movable="true" enableMouse="true" clampedToScreen="true">
<Size>
<AbsDimension x="90" y="24"/>
</Size>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<BackgroundInsets>
<AbsInset left="4" right="4" top="4" bottom="4"/>
</BackgroundInsets>
<TileSize>
<AbsValue val="16"/>
</TileSize>
<EdgeSize>
<AbsValue val="16"/>
</EdgeSize>
<Color r="0" g="0" b="0" a="0.7"/>
</Backdrop>
<Layers>
<Layer level="ARTWORK">
<FontString name="OctoLatencyText" inherits="GameFontNormalSmall" justifyH="CENTER" justifyV="CENTER">
<Size>
<AbsDimension x="80" y="16"/>
</Size>
<Anchors>
<Anchor point="CENTER">
<AbsDimension x="0" y="0"/>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad>
OctoLatency_OnLoad(this);
</OnLoad>
<OnUpdate>
OctoLatency_OnUpdate(arg1);
</OnUpdate>
<OnMouseDown>
if (arg1 == "LeftButton") then
this:StartMoving();
this.isMoving = true;
end
</OnMouseDown>
<OnMouseUp>
if (arg1 == "LeftButton") then
OctoLatency_StopMoving(this);
end
</OnMouseUp>
<OnHide>
OctoLatency_StopMoving(this);
</OnHide>
</Scripts>
</Frame>
</Ui>