|
@@ -0,0 +1,143 @@
|
|
|
+diff -ruN /tmp/tmp556h65qs/DBM-GUI/AddOns/DBM-GUI/modules/options/frames/BossHealth.lua ./AddOns/DBM-GUI/modules/options/frames/BossHealth.lua
|
|
|
+--- /tmp/tmp556h65qs/DBM-GUI/AddOns/DBM-GUI/modules/options/frames/BossHealth.lua 1970-01-01 01:00:00.000000000 +0100
|
|
|
++++ ./AddOns/DBM-GUI/modules/options/frames/BossHealth.lua 2022-11-03 21:45:04.829649109 +0100
|
|
|
+@@ -0,0 +1,46 @@
|
|
|
++local L = DBM_GUI_L
|
|
|
++local hpPanel = DBM_GUI.Cat_Frames:CreateNewPanel(L.Panel_BossHealth, "option")
|
|
|
++
|
|
|
++local hpArea = hpPanel:CreateArea(L.Area_HPFrame, nil, 150, true)
|
|
|
++hpArea:CreateCheckButton(L.HP_Enabled, true, nil, "AlwaysShowHealthFrame")
|
|
|
++local growbttn = hpArea:CreateCheckButton(L.HP_GrowUpwards, true)
|
|
|
++growbttn:SetScript("OnShow", function(self) self:SetChecked(DBM.Options.HealthFrameGrowUp) end)
|
|
|
++growbttn:SetScript("OnClick", function(self)
|
|
|
++ DBM.Options.HealthFrameGrowUp = not not self:GetChecked()
|
|
|
++ DBM.BossHealth:UpdateSettings()
|
|
|
++end)
|
|
|
++
|
|
|
++
|
|
|
++local BarWidthSlider = hpArea:CreateSlider(L.BarWidth, 150, 275, 1)
|
|
|
++BarWidthSlider:SetPoint("TOPLEFT", hpArea.frame, "TOPLEFT", 20, -75)
|
|
|
++BarWidthSlider:SetScript("OnShow", function(self) self:SetValue(DBM.Options.HealthFrameWidth or 100) end)
|
|
|
++BarWidthSlider:HookScript("OnValueChanged", function(self)
|
|
|
++ DBM.Options.HealthFrameWidth = self:GetValue()
|
|
|
++ DBM.BossHealth:UpdateSettings()
|
|
|
++end)
|
|
|
++
|
|
|
++local resetbutton = hpArea:CreateButton(L.Reset, 120, 16)
|
|
|
++resetbutton:SetPoint('BOTTOMRIGHT', hpArea.frame, "BOTTOMRIGHT", -5, 5)
|
|
|
++resetbutton:SetNormalFontObject(GameFontNormalSmall);
|
|
|
++resetbutton:SetHighlightFontObject(GameFontNormalSmall);
|
|
|
++resetbutton:SetScript("OnClick", function()
|
|
|
++ DBM.Options.HPFramePoint = DBM.DefaultOptions.HPFramePoint
|
|
|
++ DBM.Options.HPFrameX = DBM.DefaultOptions.HPFrameX
|
|
|
++ DBM.Options.HPFrameY = DBM.DefaultOptions.HPFrameY
|
|
|
++ DBM.Options.HealthFrameGrowUp = DBM.DefaultOptions.HealthFrameGrowUp
|
|
|
++ DBM.Options.HealthFrameWidth = DBM.DefaultOptions.HealthFrameWidth
|
|
|
++ DBM.BossHealth:UpdateSettings()
|
|
|
++end)
|
|
|
++
|
|
|
++local function createDummyFunc(i) return function() return i end end
|
|
|
++local showbutton = hpArea:CreateButton(L.HP_ShowDemo, 120, 16)
|
|
|
++showbutton:SetPoint('BOTTOM', resetbutton, "TOP", 0, 5)
|
|
|
++showbutton:SetNormalFontObject(GameFontNormalSmall);
|
|
|
++showbutton:SetHighlightFontObject(GameFontNormalSmall);
|
|
|
++showbutton:SetScript("OnClick", function()
|
|
|
++ DBM.BossHealth:Show("Health Frame")
|
|
|
++ DBM.BossHealth:AddBoss(createDummyFunc(25), "TestBoss 1")
|
|
|
++ DBM.BossHealth:AddBoss(createDummyFunc(50), "TestBoss 2")
|
|
|
++ DBM.BossHealth:AddBoss(createDummyFunc(75), "TestBoss 3")
|
|
|
++ DBM.BossHealth:AddBoss(createDummyFunc(100), "TestBoss 4")
|
|
|
++end)
|
|
|
+\ Kein Zeilenumbruch am Dateiende.
|
|
|
+diff -ruN /tmp/tmp556h65qs/DBM-GUI/DBM-GUI.toc ./DBM-GUI.toc
|
|
|
+--- /tmp/tmp556h65qs/DBM-GUI/DBM-GUI.toc 2022-11-03 22:40:13.204584447 +0100
|
|
|
++++ ./DBM-GUI.toc 2022-11-03 21:58:44.955032367 +0100
|
|
|
+@@ -74,3 +74,4 @@
|
|
|
+ modules\options\frames\InfoFrame.lua
|
|
|
+ modules\options\frames\Range.lua
|
|
|
+ modules\options\frames\Nameplate.lua
|
|
|
++modules\options\frames\BossHealth.lua
|
|
|
+diff -ruN /tmp/tmp556h65qs/DBM-GUI/localization.de.lua ./localization.de.lua
|
|
|
+--- /tmp/tmp556h65qs/DBM-GUI/localization.de.lua 2022-11-03 22:40:13.204584447 +0100
|
|
|
++++ ./localization.de.lua 2022-11-03 22:29:15.121522894 +0100
|
|
|
+@@ -466,3 +466,11 @@
|
|
|
+ L.Area_Position="Position"
|
|
|
+ L.Area_Style="Stil"
|
|
|
+ L.Area_General="Allgemein"
|
|
|
++
|
|
|
++-- Custom / BossHealth
|
|
|
++L.Panel_HPFrame = "Lebensanzeige"
|
|
|
++L.Area_HPFrame = "Lebensanzeige-Optionen"
|
|
|
++L.HP_Enabled = "Lebensanzeige immer anzeigen (überschreibt boss-spezifische Option)"
|
|
|
++L.HP_GrowUpwards = "Erweitere Lebensanzeige nach oben"
|
|
|
++L.HP_ShowDemo = "Zeige Lebensanzeige"
|
|
|
++L.BarWidth = "Balkenbreite: %d"
|
|
|
+\ Kein Zeilenumbruch am Dateiende.
|
|
|
+diff -ruN /tmp/tmp556h65qs/DBM-GUI/localization.en.lua ./localization.en.lua
|
|
|
+--- /tmp/tmp556h65qs/DBM-GUI/localization.en.lua 2022-11-03 22:40:13.204584447 +0100
|
|
|
++++ ./localization.en.lua 2022-11-03 22:30:15.074758448 +0100
|
|
|
+@@ -489,3 +489,12 @@
|
|
|
+ L.FontType = "Select font"
|
|
|
+
|
|
|
+ L.FontHeight = 16
|
|
|
++
|
|
|
++
|
|
|
++-- Custom / BossHealth
|
|
|
++L.Panel_HPFrame = "Health Frame"
|
|
|
++L.Area_HPFrame = "Health Frame Options"
|
|
|
++L.HP_Enabled = "Always show health frame (Overrides boss-specific option)"
|
|
|
++L.HP_GrowUpwards = "Expand health frame upward"
|
|
|
++L.HP_ShowDemo = "Show HP frame"
|
|
|
++L.BarWidth = "Bar width: %d"
|
|
|
+\ Kein Zeilenumbruch am Dateiende.
|
|
|
+diff -ruN /tmp/tmp556h65qs/DBM-GUI/modules/options/frames/BossHealth.lua ./modules/options/frames/BossHealth.lua
|
|
|
+--- /tmp/tmp556h65qs/DBM-GUI/modules/options/frames/BossHealth.lua 1970-01-01 01:00:00.000000000 +0100
|
|
|
++++ ./modules/options/frames/BossHealth.lua 2022-11-03 22:31:10.621334700 +0100
|
|
|
+@@ -0,0 +1,46 @@
|
|
|
++local L = DBM_GUI_L
|
|
|
++local hpPanel = DBM_GUI.Cat_Frames:CreateNewPanel(L.Panel_HPFrame, "option")
|
|
|
++
|
|
|
++local hpArea = hpPanel:CreateArea(L.Area_HPFrame, nil, 150, true)
|
|
|
++hpArea:CreateCheckButton(L.HP_Enabled, true, nil, "AlwaysShowHealthFrame")
|
|
|
++local growbttn = hpArea:CreateCheckButton(L.HP_GrowUpwards, true)
|
|
|
++growbttn:SetScript("OnShow", function(self) self:SetChecked(DBM.Options.HealthFrameGrowUp) end)
|
|
|
++growbttn:SetScript("OnClick", function(self)
|
|
|
++ DBM.Options.HealthFrameGrowUp = not not self:GetChecked()
|
|
|
++ DBM.BossHealth:UpdateSettings()
|
|
|
++end)
|
|
|
++
|
|
|
++
|
|
|
++local BarWidthSlider = hpArea:CreateSlider(L.BarWidth, 150, 275, 1)
|
|
|
++BarWidthSlider:SetPoint("TOPLEFT", hpArea.frame, "TOPLEFT", 20, -75)
|
|
|
++BarWidthSlider:SetScript("OnShow", function(self) self:SetValue(DBM.Options.HealthFrameWidth or 100) end)
|
|
|
++BarWidthSlider:HookScript("OnValueChanged", function(self)
|
|
|
++ DBM.Options.HealthFrameWidth = self:GetValue()
|
|
|
++ DBM.BossHealth:UpdateSettings()
|
|
|
++end)
|
|
|
++
|
|
|
++local resetbutton = hpArea:CreateButton(L.Reset, 120, 16)
|
|
|
++resetbutton:SetPoint('BOTTOMRIGHT', hpArea.frame, "BOTTOMRIGHT", -5, 5)
|
|
|
++resetbutton:SetNormalFontObject(GameFontNormalSmall);
|
|
|
++resetbutton:SetHighlightFontObject(GameFontNormalSmall);
|
|
|
++resetbutton:SetScript("OnClick", function()
|
|
|
++ DBM.Options.HPFramePoint = DBM.DefaultOptions.HPFramePoint
|
|
|
++ DBM.Options.HPFrameX = DBM.DefaultOptions.HPFrameX
|
|
|
++ DBM.Options.HPFrameY = DBM.DefaultOptions.HPFrameY
|
|
|
++ DBM.Options.HealthFrameGrowUp = DBM.DefaultOptions.HealthFrameGrowUp
|
|
|
++ DBM.Options.HealthFrameWidth = DBM.DefaultOptions.HealthFrameWidth
|
|
|
++ DBM.BossHealth:UpdateSettings()
|
|
|
++end)
|
|
|
++
|
|
|
++local function createDummyFunc(i) return function() return i end end
|
|
|
++local showbutton = hpArea:CreateButton(L.HP_ShowDemo, 120, 16)
|
|
|
++showbutton:SetPoint('BOTTOM', resetbutton, "TOP", 0, 5)
|
|
|
++showbutton:SetNormalFontObject(GameFontNormalSmall);
|
|
|
++showbutton:SetHighlightFontObject(GameFontNormalSmall);
|
|
|
++showbutton:SetScript("OnClick", function()
|
|
|
++ DBM.BossHealth:Show("Health Frame")
|
|
|
++ DBM.BossHealth:AddBoss(createDummyFunc(25), "TestBoss 1")
|
|
|
++ DBM.BossHealth:AddBoss(createDummyFunc(50), "TestBoss 2")
|
|
|
++ DBM.BossHealth:AddBoss(createDummyFunc(75), "TestBoss 3")
|
|
|
++ DBM.BossHealth:AddBoss(createDummyFunc(100), "TestBoss 4")
|
|
|
++end)
|
|
|
+\ Kein Zeilenumbruch am Dateiende.
|