Thread Tools Display Modes
12-01-14, 09:13 AM   #1
dtylertx
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 11
Bonus Objective Idea; 'Simple' addon maybe

It strikes me that it would be convenient to be able to force the % completion for bonus objectives to show all the time the frame is visible and not just on mouse over.

I don't have much experience with frames and also lake time due to RL stuff.. wondered if anyone had ideas or time
  Reply With Quote
12-01-14, 12:58 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Can you give an example of what you mean? I can only assume you mean the bonus objectives shown in the objectives tracker for the part of the zone you're in, in which case I haven't seen any that have a percent (though admittedly I haven't spent that much time playing in the expansion yet) just your standard "X/Y thing killed/done/whatever" criteria, and I haven't noticed any that change what they show on mouseover, so I'm wondering if you're talking about something else...
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
12-01-14, 02:08 PM   #3
sirann
A Flamescale Wyrmkin
Join Date: Mar 2007
Posts: 142
I think the easiest way to test what he's describing is to pick up the level 100 apexis crystal daily and begin working on it. A bar, not the secondary resource bar, shows up in the quest tracker and begins to fill as you progress. If you mouse over the bar it performs a show function of the actual integer rounded percent completed.

If I understand the op, he just wants this number that only shows on mouse over to show all the time.
  Reply With Quote
12-02-14, 08:04 AM   #4
cb0111
A Murloc Raider
Join Date: Dec 2012
Posts: 6
I think what the op means is instead of "Assault Forces at Shattrath 0 / 1" the quest line in the objective frame would be forced to always say Shattrath Forces Assaulted 63% in the blue bar that normally only pops up when you are in the area where mobs need to be killed.

I looked at the api and at a few quest log replacements, but cannot seem to find any code that controls this.
  Reply With Quote
12-02-14, 03:44 PM   #5
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,928
The progress bar isn't a fixed object, it is generated when the function ( BONUS_OBJECTIVE_TRACKER_MODULE:AddProgressBar(block, line, questID, finished) ) is called when the objective track is being created. It has no fixed name so cannot be adjusted directly.

Relevant lines in Blizzard_BonusObjectiveTracker.lua

Lua Code:
  1. function BONUS_OBJECTIVE_TRACKER_MODULE:AddProgressBar(block, line, questID, finished)
  2.     local progressBar = self.usedProgressBars[block] and self.usedProgressBars[block][line];
  3.     if ( not progressBar ) then
  4.         local numFreeProgressBars = #self.freeProgressBars;
  5.         local parent = block.ScrollContents or block;
  6.         if ( numFreeProgressBars > 0 ) then
  7.             progressBar = self.freeProgressBars[numFreeProgressBars];
  8.             tremove(self.freeProgressBars, numFreeProgressBars);
  9.             progressBar:SetParent(parent);
  10.             progressBar:Show();
  11.         else
  12.             progressBar = CreateFrame("Frame", nil, parent, "BonusTrackerProgressBarTemplate");
  13.             progressBar.height = progressBar:GetHeight();
  14.         end
  15.         if ( not self.usedProgressBars[block] ) then
  16.             self.usedProgressBars[block] = { };
  17.         end
  18.         self.usedProgressBars[block][line] = progressBar;
  19.         progressBar:RegisterEvent("QUEST_LOG_UPDATE");
  20.         progressBar:Show();
  21.         progressBar.Bar.Label:Hide();
  22.         -- initialize to the right values
  23.         progressBar.questID = questID;
  24.         if( not finished ) then
  25.             BonusObjectiveTrackerProgressBar_SetValue( progressBar, GetQuestProgressBarPercent(questID) );
  26.         end
  27.     end
  28.     -- anchor the status bar
  29.     local anchor = block.currentLine or block.HeaderText;
  30.     if ( anchor ) then
  31.         progressBar:SetPoint("TOPLEFT", anchor, "BOTTOMLEFT", 0, -block.module.lineSpacing);
  32.     else
  33.         progressBar:SetPoint("TOPLEFT", 0, -block.module.lineSpacing);
  34.     end
  35.  
  36.     if( finished ) then
  37.         progressBar.finished = true;
  38.         BonusObjectiveTrackerProgressBar_SetValue( progressBar, 100 );
  39.     end
  40.    
  41.     progressBar.block = block;
  42.     progressBar.questID = questID; 
  43.  
  44.     line.ProgressBar = progressBar;
  45.     block.height = block.height + progressBar.height + block.module.lineSpacing;
  46.     block.currentLine = progressBar;
  47.     return progressBar;
  48. end

The only thing I can think of is to see if you can create your own version of template control "BonusTrackerProgressBarTemplate" and adjust the Show/Hide functionality to always show and see if the customer template version is used instead without any problems.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
12-02-14, 07:08 PM   #6
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Looks to me like all you'd need to do is iterate through BONUS_OBJECTIVE_TRACKER_MODULE.usedProgressBars and find the one that has the relevant questID assigned to it. From there, you'd be able to manipulate the scripts for the FontString that shows the percentage to make it always show.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
12-03-14, 04:40 AM   #7
dtylertx
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 11
Originally Posted by Torhal View Post
Looks to me like all you'd need to do is iterate through BONUS_OBJECTIVE_TRACKER_MODULE.usedProgressBars and find the one that has the relevant questID assigned to it. From there, you'd be able to manipulate the scripts for the FontString that shows the percentage to make it always show.

I understand that 'objectively' lol if not specifically and eventually when I have the time to do this, thank you - and yes guys thats what I mean, for the Apexis dailies - i forgot that the bar doesn't appear for true bonus objectives when i wrote the original post.

Last edited by dtylertx : 12-03-14 at 04:44 AM.
  Reply With Quote
12-03-14, 06:21 AM   #8
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,928
Looking at the xml side of the template you need to look at the scripts for progressBar.Bar as that is the actual statusbar control. You can simply replace the OnEnter, OnLeave scripts as all they do is to show the text. So simply show the text ( progressBar.Label:Show() ) and then set the OnLeave and OnEnter scripts to do nothing and hope that no other addon you use overrides it.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Bonus Objective Idea; 'Simple' addon maybe

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off