Patch 4.4

game damage font
6 new fonts
This commit is contained in:
Athene
2015-11-27 17:04:36 +01:00
parent 63e5606597
commit 00517d96ef
13 changed files with 98 additions and 11 deletions
+46 -2
View File
@@ -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
@@ -2562,6 +2562,20 @@
</Anchor>
</Anchors>
</Button>
<!-- Edit Blizzard Font Settings Button -->
<Button name="$parentEditBlizzardFontSettingsButton" inherits="MSBTButtonTemplate">
<Size>
<AbsDimension x="200" y="20" />
</Size>
<Anchors>
<Anchor point="BOTTOMLEFT">
<Offset>
<AbsDimension x="365" y="15" />
</Offset>
</Anchor>
</Anchors>
</Button>
<!-- Show Partial Effects Checkbox -->
@@ -1,5 +1,5 @@
## Interface: 11200
## Version: 4.32
## Version: 4.4
## Title: Mik's Scrolling Battle Text Options
## Notes: Load on demand options for Mik's Scrolling Battle Text
## Dependencies: MikScrollingBattleText
@@ -109,6 +109,7 @@ MikSBTOpt.SLIDERS = {
MikSBTOpt.BUTTONS = {
["Tab1FrameEditFontSettingsButton"] = { Label="Edit Master Font Settings", Tooltip="Edits the master font settings. These settings will be inherited by each scroll area and the events therein unless they are overridden."},
["Tab1FrameEditBlizzardFontSettingsButton"] = { Label="Edit Game Damage Font", Tooltip="Edits Blizzard's scrolling text font settings."},
["Tab2FrameEditFontSettingsButton"] = { Label="Edit Scroll Area Fonts", Tooltip="Edits the incoming scroll area font settings. These settings will be inherited by each event in the incoming scroll area unless they are overridden."},
["Tab3FrameEditFontSettingsButton"] = { Label="Edit Scroll Area Fonts", Tooltip="Edits the outgoing scroll area font settings. These settings will be inherited by each event in the outgoing scroll area unless they are overridden."},
["Tab4FrameEditFontSettingsButton"] = { Label="Edit Scroll Area Fonts", Tooltip="Edits the notification scroll area font settings. These settings will be inherited by each event in the notification scroll area unless they are overridden."},
@@ -176,6 +177,10 @@ MikSBTOpt.FONT_SETTINGS_TOOLTIPS = {
Outline="Set the trigger font outline.",
InheritFontSize="Set whether or not to inherit the font size from the notification scroll area font settings.",
FontSize="Set the trigger font size.",
},
["Blizzard"] = {
FontSettingsTitle="Blizzard",
Font="Set the Blizzard scrolling texts font.",
}
}