From 2d78840e0035cc7f7a8ebc6759d39aebaa0eb5e9 Mon Sep 17 00:00:00 2001 From: opussf Date: Sat, 6 Aug 2022 15:54:37 -0700 Subject: [PATCH 01/40] Change PostClick to OnClick Express yourself: Don't hold back! --- FEATURE.md | 10 +++++++++- src/INEEDOptions.lua | 6 +++--- src/INEEDOptions.xml | 22 +++++++++++----------- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/FEATURE.md b/FEATURE.md index 82f59c1..e76c358 100644 --- a/FEATURE.md +++ b/FEATURE.md @@ -1,5 +1,13 @@ # Feature +## ExpandedOptions + +Fix the options panel. +SetValue error is happening. + +Expand the options. + + ## othersNeedUI After looking at some possible changes, this one seemed to be best. @@ -246,4 +254,4 @@ function lib.isSoulbound(bag, slot) end ToolTip:SetHyperlink( ) - Link = HyperLink or 'linktype:linkdata' \ No newline at end of file + Link = HyperLink or 'linktype:linkdata' diff --git a/src/INEEDOptions.lua b/src/INEEDOptions.lua index 493382f..ce63ffe 100644 --- a/src/INEEDOptions.lua +++ b/src/INEEDOptions.lua @@ -67,7 +67,7 @@ function INEED.OptionsPanel_CheckButton_OnLoad( self, option, text ) getglobal(self:GetName().."Text"):SetText(text); self:SetChecked(INEED_options[option]); end -function INEED.OptionsPanel_CheckButton_PostClick( self, option ) +function INEED.OptionsPanel_CheckButton_OnClick( self, option ) if INEED.oldValues then INEED.oldValues[option] = INEED.oldValues[option] or INEED_options[option]; else @@ -80,8 +80,8 @@ function INEED.OptionsPanel_EditBox_OnLoad( self, option ) self:SetCursorPosition(0) end --- PostClick for checkbuttons -function INEED.OptionsPanel_CheckButton_PostClick( self, option ) +-- OnClick for checkbuttons +function INEED.OptionsPanel_CheckButton_OnClick( self, option ) if INEED.oldValues then INEED.oldValues[option] = INEED.oldValues[option] or INEED_options[option] else diff --git a/src/INEEDOptions.xml b/src/INEEDOptions.xml index c31401d..8268ea1 100644 --- a/src/INEEDOptions.xml +++ b/src/INEEDOptions.xml @@ -35,7 +35,7 @@ self.tooltip = "Hide list during combat"; INEED.OptionsPanel_CheckButton_OnLoad(self,"combatHide","Hide list during combat"); - INEED.OptionsPanel_CheckButton_PostClick(self,"combatHide") + INEED.OptionsPanel_CheckButton_OnClick(self,"combatHide") @@ -45,9 +45,9 @@ - self.tooltip = "Show progress in Alert pane"; + self.tooltip = "Show progress in Alert pane (Like a quest)"; INEED.OptionsPanel_CheckButton_OnLoad(self,"showProgress","Show progress in the Alert pane"); - INEED.OptionsPanel_CheckButton_PostClick(self,"showProgress") + INEED.OptionsPanel_CheckButton_OnClick(self,"showProgress") @@ -59,7 +59,7 @@ self.tooltip = "Show progress if others need an item"; INEED.OptionsPanel_CheckButton_OnLoad(self,"showGlobal","Show progress if others need an item"); - INEED.OptionsPanel_CheckButton_PostClick(self,"showGlobal") + INEED.OptionsPanel_CheckButton_OnClick(self,"showGlobal") @@ -71,7 +71,7 @@ self.tooltip = "Print progress in general chat frame"; INEED.OptionsPanel_CheckButton_OnLoad(self,"printProgress","Print progress in general chat frame"); - INEED.OptionsPanel_CheckButton_PostClick(self,"printProgress") + INEED.OptionsPanel_CheckButton_OnClick(self,"printProgress") @@ -83,7 +83,7 @@ self.tooltip = "Include amount changed when annoucing progress"; INEED.OptionsPanel_CheckButton_OnLoad(self,"includeChange","Include amount changed with progress"); - INEED.OptionsPanel_CheckButton_PostClick(self,"includeChange") + INEED.OptionsPanel_CheckButton_OnClick(self,"includeChange") @@ -95,7 +95,7 @@ self.tooltip = "Show alert on success" INEED.OptionsPanel_CheckButton_OnLoad( self, "showSuccess", "Show alert on Success" ) - INEED.OptionsPanel_CheckButton_PostClick( self, "showSuccess" ) + INEED.OptionsPanel_CheckButton_OnClick( self, "showSuccess" ) @@ -107,7 +107,7 @@ self.tooltip = "Print success in general chat frame"; INEED.OptionsPanel_CheckButton_OnLoad(self,"printSuccess","Print success in general chat frame"); - INEED.OptionsPanel_CheckButton_PostClick(self,"printSuccess") + INEED.OptionsPanel_CheckButton_OnClick(self,"printSuccess") @@ -119,7 +119,7 @@ self.tooltip = "Take a screenshot on success" INEED.OptionsPanel_CheckButton_OnLoad( self, "doScreenShot", "Take a screenshot on success") - INEED.OptionsPanel_CheckButton_PostClick( self, "doScreenShot" ) + INEED.OptionsPanel_CheckButton_OnClick( self, "doScreenShot" ) @@ -131,7 +131,7 @@ self.tooltip = "Make a noise on success" INEED.OptionsPanel_CheckButton_OnLoad( self, "audibleSuccess", "Play alert on Success" ) - INEED.OptionsPanel_CheckButton_PostClick( self, "audibleSuccess" ) + INEED.OptionsPanel_CheckButton_OnClick( self, "audibleSuccess" ) @@ -143,7 +143,7 @@ self.tooltip = "Perform an emote on success" INEED.OptionsPanel_CheckButton_OnLoad( self, "doEmote", "Use Emote:" ) - INEED.OptionsPanel_CheckButton_PostClick( self, "doEmote" ) + INEED.OptionsPanel_CheckButton_OnClick( self, "doEmote" ) From 6369ee2a73931c15563dfe8ab6a3e043888f0e6e Mon Sep 17 00:00:00 2001 From: opussf Date: Sat, 6 Aug 2022 17:00:42 -0700 Subject: [PATCH 02/40] Prune unknown links Avidly accumulated amount of incompetence. Sleep is for people who don't drink coffee. --- src/INEED.lua | 9 +++++++++ src/INEEDOptions.xml | 37 ++++++++++++++++++++++++++++++++----- 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/src/INEED.lua b/src/INEED.lua index cb13c70..be4e7f1 100644 --- a/src/INEED.lua +++ b/src/INEED.lua @@ -50,6 +50,7 @@ function INEED.OnLoad() SlashCmdList["INEED"] = function(msg) INEED.command(msg); end INEED_Frame:RegisterEvent("ADDON_LOADED") + INEED_Frame:RegisterEvent("VARIABLES_LOADED") INEED_Frame:RegisterEvent("BAG_UPDATE") INEED_Frame:RegisterEvent("MERCHANT_SHOW") INEED_Frame:RegisterEvent("MAIL_SHOW") @@ -214,6 +215,14 @@ function INEED.ADDON_LOADED( _, arg1 ) INEED.Print( INEED_MSG_VERSION .. " Loaded" ) end end +function INEED.VARIABLES_LOADED( _, arg1 ) + INEED_Frame:UnregisterEvent("VARIABLES_LOADED") + for ts, _ in pairs(INEED_unknown) do + if time()-ts > 86400 then + INEED_unknown[ts] = nil + end + end +end function INEED.MAIL_SHOW() INEED.Print("Others on this server need:") INEED.showFulfillList() diff --git a/src/INEEDOptions.xml b/src/INEEDOptions.xml index 8268ea1..45379e3 100644 --- a/src/INEEDOptions.xml +++ b/src/INEEDOptions.xml @@ -50,6 +50,18 @@ INEED.OptionsPanel_CheckButton_OnClick(self,"showProgress") + @@ -94,7 +106,7 @@ self.tooltip = "Show alert on success" - INEED.OptionsPanel_CheckButton_OnLoad( self, "showSuccess", "Show alert on Success" ) + INEED.OptionsPanel_CheckButton_OnLoad( self, "showSuccess", "Shows an alert in the middle of the screen." ) INEED.OptionsPanel_CheckButton_OnClick( self, "showSuccess" ) @@ -159,15 +171,13 @@ INEED.OptionsPanel_EditBox_TextChanged( self, "emote" ) - - + + + _G[self:GetName().."Text"]:SetText( "Maximum Bars" ); @@ -261,31 +302,8 @@ INEED.OptionsPanel_Slider_ValueChanged( self, "barCount" ) +--> - - - - - - - - - self.tooltip = "Number of seconds to show recently updated items" - INEED.OptionsPanel_EditBox_OnLoad( self, "displayUIListDisplaySeconds" ) - INEED.OptionsPanel_EditBox_TextChanged( self, "displayUIListDisplaySeconds" ) - - - - - - - - - - - - - From 1f067be2552bee9cdd2097928451100afd5ff903 Mon Sep 17 00:00:00 2001 From: opussf Date: Thu, 25 Aug 2022 23:56:19 -0700 Subject: [PATCH 28/40] Duration Box set I never grew up, I just got better toys. --- src/INEEDOptions.lua | 28 ++++++++++++++++ src/INEEDOptions.xml | 79 ++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 101 insertions(+), 6 deletions(-) diff --git a/src/INEEDOptions.lua b/src/INEEDOptions.lua index 00f35d0..6c1dfd3 100644 --- a/src/INEEDOptions.lua +++ b/src/INEEDOptions.lua @@ -105,6 +105,34 @@ function INEED.OptionsPanel_EditBox_TextChanged( self, option ) end end +-- Duration field events +function INEED.OptionsPanel_Duration_OnLoad( self, option ) + if string.find( self:GetName(), "Days" ) then + local days = math.floor( INEED_options[option]/86400 ) + self:SetText( tostring( days ) ) + INEED.Print( "days: "..days ) + elseif string.find( self:GetName(), "Hours" ) then + local hours = math.floor( (INEED_options[option]/3600)%24 ) + self:SetText( tostring( hours ) ) + INEED.Print( "hours: "..hours ) + elseif string.find( self:GetName(), "Minutes" ) then + local minutes = math.floor( (INEED_options[option]/60)%60 ) + self:SetText( tostring( minutes ) ) + INEED.Print( "minutes: "..minutes ) + elseif string.find( self:GetName(), "Seconds" ) then + local seconds = math.floor( (INEED_options[option]%60) ) + self:SetText( tostring( seconds ) ) + INEED.Print( "seconds: "..seconds ) + end +end +function INEED.OptionsPanel_Duration_TextChanged( self, option ) + INEED.Print( self:GetName() ..":"..INEED_options[option] ) + if string.find( self:GetName(), "Days" ) then + local days = tonumber( self:GetText() ) + INEED.Print( "days: "..days..INEED_options[option] ) + end +end + -- Slider events function INEED.OptionsPanel_Slider_ValueChanged( self, option ) if INEED.oldValues then diff --git a/src/INEEDOptions.xml b/src/INEEDOptions.xml index 45d9b17..5b17a39 100644 --- a/src/INEEDOptions.xml +++ b/src/INEEDOptions.xml @@ -251,8 +251,8 @@ - - + + @@ -260,26 +260,93 @@ self:SetAutoFocus( false ) + INEED.OptionsPanel_Duration_OnLoad( self, "displayUIListDisplaySeconds" ) + INEED.OptionsPanel_Duration_TextChanged( self, "displayUIListDisplaySeconds" ) - - + + - + + + + + + + + + + + + + + + + self:SetAutoFocus( false ) + INEED.OptionsPanel_Duration_OnLoad( self, "displayUIListDisplaySeconds" ) + + + + + + + + + + + + + + + + + + + + + self:SetAutoFocus( false ) + INEED.OptionsPanel_Duration_OnLoad( self, "displayUIListDisplaySeconds" ) + + + + + + + + + + + + + + + + + + + + + self:SetAutoFocus( false ) + INEED.OptionsPanel_Duration_OnLoad( self, "displayUIListDisplaySeconds" ) + + + + + + - From 254f93cb51176f3ca5555ecb665913fe98f8db6f Mon Sep 17 00:00:00 2001 From: opussf Date: Sat, 27 Aug 2022 00:53:36 -0700 Subject: [PATCH 31/40] This is working! Noli me tangere. --- src/INEEDOptions.lua | 4 ++-- src/INEEDOptions.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/INEEDOptions.lua b/src/INEEDOptions.lua index 5411259..be819b8 100644 --- a/src/INEEDOptions.lua +++ b/src/INEEDOptions.lua @@ -90,7 +90,7 @@ function INEED.OptionsPanel_CheckButton_OnClick( self, option ) end function INEED.OptionsPanel_EditBox_TextChanged( self, option ) INEED.OptionPanel_KeepOriginalValue( option ) - INEED_options[option] = (self:IsNumeric() and tonumber(self:GetText()) or self:GetText()) + INEED_options[option] = (self:IsNumeric() and self:GetNumber() or self:GetText()) if self:IsNumeric() then self:SetValue(INEED_options[option]) end @@ -101,7 +101,7 @@ function INEED.OptionsPanel_Duration_OnShow( self, option ) if INEED.variables_loaded then local myName = self:GetName() local duration = INEED_options[option] or 0 - INEED.Print( "show: "..myName ..":"..(duration or "nil") ) + --INEED.Print( "show: "..myName ..":"..(duration or "nil") ) if string.find( myName, "Days" ) then local days = math.floor( duration/86400 ) self:SetNumber( days ) diff --git a/src/INEEDOptions.xml b/src/INEEDOptions.xml index f717c15..4acb320 100644 --- a/src/INEEDOptions.xml +++ b/src/INEEDOptions.xml @@ -252,7 +252,7 @@ - + From 6fd95f29347dedddde69e131f7410b5c6638bc12 Mon Sep 17 00:00:00 2001 From: opussf Date: Sat, 27 Aug 2022 12:42:58 -0700 Subject: [PATCH 32/40] Account option work The wise are aware of their treasure, while fools follow their vanity. --- src/INEEDOptions.xml | 153 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) diff --git a/src/INEEDOptions.xml b/src/INEEDOptions.xml index 4acb320..9960e4a 100644 --- a/src/INEEDOptions.xml +++ b/src/INEEDOptions.xml @@ -73,6 +73,27 @@ + + + + + + + + + + + + + + + + + + + + +