mirror of
https://github.com/brues-code/Vanilla_MikScrollingBattleText.git
synced 2026-10-11 08:00:03 +00:00
Patch 4.4
game damage font 6 new fonts
This commit is contained in:
@@ -955,6 +955,7 @@ end
|
||||
function MikSBTOpt.InitButtons()
|
||||
-- Initialize the edit font settings buttons for master, incoming, outgoing, and notification.
|
||||
local key = "Tab1FrameEditFontSettingsButton"; MikSBTOpt.SetupButton(OPTIONS_FRAME_NAME .. key, MikSBTOpt.BUTTONS[key].Label, MikSBTOpt.BUTTONS[key].Tooltip);
|
||||
key = "Tab1FrameEditBlizzardFontSettingsButton"; MikSBTOpt.SetupButton(OPTIONS_FRAME_NAME .. key, MikSBTOpt.BUTTONS[key].Label, MikSBTOpt.BUTTONS[key].Tooltip);
|
||||
key = "Tab2FrameEditFontSettingsButton"; MikSBTOpt.SetupButton(OPTIONS_FRAME_NAME .. key, MikSBTOpt.BUTTONS[key].Label, MikSBTOpt.BUTTONS[key].Tooltip);
|
||||
key = "Tab3FrameEditFontSettingsButton"; MikSBTOpt.SetupButton(OPTIONS_FRAME_NAME .. key, MikSBTOpt.BUTTONS[key].Label, MikSBTOpt.BUTTONS[key].Tooltip);
|
||||
key = "Tab4FrameEditFontSettingsButton"; MikSBTOpt.SetupButton(OPTIONS_FRAME_NAME .. key, MikSBTOpt.BUTTONS[key].Label, MikSBTOpt.BUTTONS[key].Tooltip);
|
||||
@@ -1022,6 +1023,14 @@ function MikSBTOpt.ButtonOnClick()
|
||||
getglobal(FONT_SETTINGS_FRAME_NAME .. "Title"):SetText(MikSBTOpt.FONT_SETTINGS_TOOLTIPS["Master"].FontSettingsTitle);
|
||||
MikSBTOpt.ShowMasterFontSettings();
|
||||
|
||||
-- Edit Blizzard scrolling text font.
|
||||
elseif (this:GetName() == OPTIONS_FRAME_NAME .. "Tab1FrameEditBlizzardFontSettingsButton") then
|
||||
local fontSettingsFrame = getglobal(FONT_SETTINGS_FRAME_NAME);
|
||||
fontSettingsFrame:SetPoint("TOPLEFT", this, "BOTTOMLEFT");
|
||||
fontSettingsFrame:Raise();
|
||||
getglobal(FONT_SETTINGS_FRAME_NAME .. "Title"):SetText(MikSBTOpt.FONT_SETTINGS_TOOLTIPS["Blizzard"].FontSettingsTitle);
|
||||
MikSBTOpt.ShowBlizzardFontSettings();
|
||||
|
||||
-- Edit incoming font settings button.
|
||||
elseif (this:GetName() == OPTIONS_FRAME_NAME .. "Tab2FrameEditFontSettingsButton") then
|
||||
-- Hide the event message editbox if it's shown.
|
||||
@@ -2352,6 +2361,41 @@ function MikSBTOpt.ShowMasterFontSettings()
|
||||
end
|
||||
|
||||
|
||||
-- **********************************************************************************
|
||||
-- Show blizzard font settings.
|
||||
-- **********************************************************************************
|
||||
function MikSBTOpt.ShowBlizzardFontSettings()
|
||||
-- Hide the crit font settings controls.
|
||||
MikSBTOpt.HideCritFontControls()
|
||||
|
||||
local fontSettingsFrame = getglobal(FONT_SETTINGS_FRAME_NAME);
|
||||
fontSettingsFrame.InheritedOutlineIndex = MikSBT.GetOptionFromVarPath("MasterFontSettings.Normal.OutlineIndex");
|
||||
fontSettingsFrame.InheritedFontSize = MikSBT.GetOptionFromVarPath("MasterFontSettings.Normal.FontSize");
|
||||
|
||||
-- Setup the normal font dropdown.
|
||||
local key = "FontDropdown";
|
||||
MikSBTOpt.SetupDropdown(FONT_SETTINGS_FRAME_NAME .. key, MikSBTOpt.DROPDOWNS[key].Label, MikSBTOpt.FONT_SETTINGS_TOOLTIPS["Blizzard"].Font, MikSBTOpt.FontSettingsDropdownOnClick, MikSBT.AVAILABLE_FONTS, "BlizzardFontSettings.Normal.FontIndex");
|
||||
MikSBTOpt.PopulateDropdown(FONT_SETTINGS_FRAME_NAME .. key);
|
||||
|
||||
-- Hide the inherit font size and crit font size checkboxes.
|
||||
getglobal(FONT_SETTINGS_FRAME_NAME .. "InheritFontSizeCheckbox"):Hide();
|
||||
|
||||
-- Hide the dropdown button.
|
||||
getglobal(FONT_SETTINGS_FRAME_NAME .. "FontOutlineDropdown"):Hide();
|
||||
|
||||
-- Show the font size and crit size sliders.
|
||||
getglobal(FONT_SETTINGS_FRAME_NAME .. "FontSizeSlider"):Hide();
|
||||
|
||||
|
||||
-- Show the font settings frame.
|
||||
getglobal(FONT_SETTINGS_FRAME_NAME):Show();
|
||||
|
||||
-- Update the font previews.
|
||||
MikSBTOpt.UpdateFontPreviews();
|
||||
MikSBT.Print("Restart the game or disconnect to apply Game Damage font.", 1, 0, 0)
|
||||
end
|
||||
|
||||
|
||||
-- **********************************************************************************
|
||||
-- Show scroll area font settings .
|
||||
-- **********************************************************************************
|
||||
@@ -2704,13 +2748,13 @@ function MikSBTOpt.UpdateFontPreviews()
|
||||
|
||||
-- Get the selected normal font index.
|
||||
local fontIndex = UIDropDownMenu_GetSelectedValue(getglobal(FONT_SETTINGS_FRAME_NAME .. "FontDropdown"));
|
||||
if (fontIndex == 0) then
|
||||
if (fontIndex == 0 or fontIndex == nil) then
|
||||
fontIndex = fontSettingsFrame.InheritedFontIndex;
|
||||
end
|
||||
|
||||
-- Get the selected normal outline index.
|
||||
local outlineIndex = UIDropDownMenu_GetSelectedValue(getglobal(FONT_SETTINGS_FRAME_NAME .. "FontOutlineDropdown"));
|
||||
if (outlineIndex == 0) then
|
||||
if (outlineIndex == 0 or outlineIndex == nil) then
|
||||
outlineIndex = fontSettingsFrame.InheritedOutlineIndex;
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user