Skip to content

Commit

Permalink
minor improvements and bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
1onar committed Nov 9, 2024
1 parent 2ff7356 commit e49b878
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions KeyUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ function addon:Load()
addon:refresh_layouts()
end

function addon:LoadSpells()
addon.spells = {}
function addon:LoadSpells() -- DIFFERENCE Retail Code
addon.spells = {}

-- Loop through all spellbook tabs in Classic WoW
for i = 1, GetNumSpellTabs() do
Expand All @@ -305,7 +305,7 @@ function addon:LoadSpells()
end
end
end
end
end -- DIFFERENCE Retail Code

-- Update the visibility of keyboard and mouse based on settings, only if addon is open
function addon:UpdateInterfaceVisibility()
Expand Down Expand Up @@ -785,7 +785,7 @@ function addon:SetKey(button)
end

-- Calculate the maximum allowed characters based on button width
local max_allowed_chars = math.floor(button:GetWidth() / 8)
local max_allowed_chars = math.floor(button:GetWidth() / 9)
local combined_text = button.short_key:GetText() -- Combined text with modifiers if present

-- Use Condensed font if the combined text exceeds max_allowed_chars
Expand Down
2 changes: 1 addition & 1 deletion KeyboardFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ function addon:CreateKeyboardControl()

keyboard_control_frame.MinMax = CreateFrame("Frame", nil, keyboard_control_frame, "MaximizeMinimizeButtonFrameTemplate")
keyboard_control_frame.MinMax:SetSize(34, 34)
keyboard_control_frame.MinMax:SetPoint("RIGHT", Controls.Close, "LEFT", 14, 0)
keyboard_control_frame.MinMax:SetPoint("RIGHT", keyboard_control_frame.Close, "LEFT", 14, 0)
keyboard_control_frame.MinMax:SetOnMaximizedCallback(OnMaximize) -- DIFFERENCE Retail Code
keyboard_control_frame.MinMax:SetOnMinimizedCallback(OnMinimize) -- DIFFERENCE Retail Code

Expand Down
2 changes: 1 addition & 1 deletion MouseFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ function addon:CreateMouseControl()

mouse_control_frame.MinMax = CreateFrame("Frame", nil, mouse_control_frame, "MaximizeMinimizeButtonFrameTemplate")
mouse_control_frame.MinMax:SetSize(42, 42) -- DIFFERENCE Retail Code
mouse_control_frame.MinMax:SetPoint("RIGHT", MouseControls.Close, "LEFT", 18, 0) -- DIFFERENCE Retail Code
mouse_control_frame.MinMax:SetPoint("RIGHT", mouse_control_frame.Close, "LEFT", 18, 0) -- DIFFERENCE Retail Code
mouse_control_frame.MinMax:SetOnMaximizedCallback(OnMaximizeMouse)
mouse_control_frame.MinMax:SetOnMinimizedCallback(OnMinimizeMouse)

Expand Down

0 comments on commit e49b878

Please sign in to comment.