mirror of
https://github.com/brues-code/Vanilla_MikScrollingBattleText.git
synced 2026-10-10 23:50:02 +00:00
Patch 4.4
game damage font 6 new fonts
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -234,6 +234,7 @@ end
|
||||
function MikSBT.OnLoad()
|
||||
-- Register for the ADDON_LOADED event.
|
||||
MSBTEventFrame:RegisterEvent("ADDON_LOADED");
|
||||
MSBTEventFrame:RegisterEvent("PLAYER_ENTERING_WORLD");
|
||||
end
|
||||
|
||||
-- **********************************************************************************
|
||||
@@ -242,12 +243,15 @@ end
|
||||
function MikSBT.OnEvent()
|
||||
-- When an addon is loaded.
|
||||
if (event == "ADDON_LOADED") then
|
||||
|
||||
-- Set Game Damage font
|
||||
if MikSBT_Save then
|
||||
DAMAGE_TEXT_FONT = MikSBT.AVAILABLE_FONTS[MikSBT_Save.Profiles[MikSBT_Save.CurrentProfile].BlizzardFontSettings.Normal.FontIndex].Path or "Fonts\\FRIZQT__.TTF"
|
||||
end
|
||||
|
||||
-- Make sure it's this addon.
|
||||
if (arg1 == MikSBT.MOD_NAME) then
|
||||
|
||||
-- Don't get notification for other addons being loaded.
|
||||
this:UnregisterEvent("ADDON_LOADED");
|
||||
|
||||
-- Register for the events the helper is interested in receiving.
|
||||
MikSBT.RegisterEvents();
|
||||
|
||||
@@ -256,6 +260,11 @@ function MikSBT.OnEvent()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if (event == "PLAYER_ENTERING_WORLD") then
|
||||
this:UnregisterEvent("ADDON_LOADED");
|
||||
this:UnregisterEvent("PLAYER_ENTERING_WORLD");
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -364,7 +373,6 @@ function MikSBT.Init()
|
||||
-- Updates profiles created by older versions.
|
||||
MikSBT.UpdateProfiles();
|
||||
|
||||
|
||||
-- Set the current profile.
|
||||
MikSBT.CurrentProfile = MikSBT_Save.Profiles[MikSBT_Save.CurrentProfile];
|
||||
|
||||
@@ -1272,6 +1280,13 @@ function MikSBT.UpdateProfiles()
|
||||
profile.CreationVersion = 4.3;
|
||||
end
|
||||
|
||||
if (profile.CreationVersion < 4.4) then
|
||||
|
||||
profile.BlizzardFontSettings = MikSBT.CopyTable(MikSBT.DEFAULT_CONFIG.BlizzardFontSettings);
|
||||
|
||||
profile.CreationVersion = 4.4;
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
## Interface: 11200
|
||||
## Version: 4.32
|
||||
## Version: 4.4
|
||||
## Title: Mik's Scrolling Battle Text
|
||||
## Notes: Scrolls battle information around the character model.
|
||||
## OptionalDeps: SW_FixLogStrings
|
||||
|
||||
@@ -12,8 +12,8 @@ MikSBT = {};
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
MikSBT.MOD_NAME = "MikScrollingBattleText"
|
||||
MikSBT.VERSION_NUMBER = 4.32;
|
||||
MikSBT.VERSION_STRING = "v4.32";
|
||||
MikSBT.VERSION_NUMBER = 4.4;
|
||||
MikSBT.VERSION_STRING = "v4.4";
|
||||
MikSBT.WINDOW_TITLE = "Mik's Scrolling Battle Text " .. MikSBT.VERSION_STRING .. " - \124cffF58CBA\124hAthene Edit\124h\124r";
|
||||
|
||||
MikSBT.COMMAND = "/msbt";
|
||||
@@ -100,6 +100,12 @@ MikSBT.AVAILABLE_FONTS = {
|
||||
[14] = {Name="Bazooka", Path="Interface\\Addons\\MikScrollingBattleText\\Fonts\\bazooka.ttf"},
|
||||
[15] = {Name="Cooline", Path="Interface\\Addons\\MikScrollingBattleText\\Fonts\\cooline.ttf"},
|
||||
[16] = {Name="Yellowjacket", Path="Interface\\Addons\\MikScrollingBattleText\\Fonts\\yellowjacket.ttf"},
|
||||
[17] = {Name="Defused", Path="Interface\\Addons\\MikScrollingBattleText\\Fonts\\defused.ttf"},
|
||||
[18] = {Name="Zombie", Path="Interface\\Addons\\MikScrollingBattleText\\Fonts\\zombie.ttf"},
|
||||
[19] = {Name="Basket Of Hammers", Path="Interface\\Addons\\MikScrollingBattleText\\Fonts\\basketofhammers.ttf"},
|
||||
[20] = {Name="College", Path="Interface\\Addons\\MikScrollingBattleText\\Fonts\\college.ttf"},
|
||||
[21] = {Name="Galaxy", Path="Interface\\Addons\\MikScrollingBattleText\\Fonts\\galaxy.ttf"},
|
||||
[22] = {Name="Skratch Punk", Path="Interface\\Addons\\MikScrollingBattleText\\Fonts\\skratchpunk.ttf"},
|
||||
};
|
||||
|
||||
-- Holds the available font outlines.
|
||||
@@ -170,7 +176,10 @@ MikSBT.DEFAULT_CONFIG = {
|
||||
AnimationStep = 1.5,
|
||||
MasterFontSettings = {
|
||||
Normal = {FontIndex=7, OutlineIndex=2, FontSize=18},
|
||||
Crit = {FontIndex=7, OutlineIndex=2, FontSize=26},
|
||||
Crit = {FontIndex=7, OutlineIndex=2, FontSize=26},
|
||||
},
|
||||
BlizzardFontSettings = {
|
||||
Normal = {FontIndex=6},
|
||||
},
|
||||
DisplaySettings = {
|
||||
Incoming = {
|
||||
|
||||
@@ -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.",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user