Thread Tools Display Modes
01/27/16, 10:21 PM   #1
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
[FIXED] Problem with texture - Only showing once

Hi all,

I'm working on a new addon and I got some trouble with a texture control.
You can grab the source over here:
FCO StarveStop - with texture bug

Problem
1. The icon texture should show as I open the LAM settings panel and the alert icon is enabled -> It will only do this once for each character. If I disable the alert icon and enable it again the texture won't be shown anymore
2. The icon should be shown if your buff food runs out. You can test this if you enable the alert icon in the settings and use the global debug function with /script or /zgoo or torchbug (etc. addons).
Lua Code:
  1. FCOStarveStop.debugEvent(<buffFoodName>)

<buffFoodName> should be one entry from the 2 lists
FCOStarveStop.buffNames.food
FCOStarveStop.buffNames.drink

e.g.
Code:
increase max health
If you currently do not have this kind of buff food active the alert text/icon messages will show up (at leats the text will be shown, but the icon won't )

3. The icon should be hidden if you right click the icon -> Works but it won't be shown again?

I guess it's a simple silly bug but I can't find it The icon just shows once for each character and afterwards it is gone. ZGOO is telling me that IsHidden() is False. The same for the parent TopLevel control FCOStarveStopContainer.

So why is this damn icon always hidden
Thanks for your help.

Last edited by Baertram : 01/28/16 at 07:58 AM.
  Reply With Quote
01/28/16, 06:30 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Normally the function
Code:
function FCOStarveStop.ToggleAlertIcon()
should make the icon unhidden again.

Everything works as it should as long as I do not hide the icon once (by right clicking it with the mouse e.g.).
Afterwards I'm not able to make it visible again :-(
  Reply With Quote
01/28/16, 07:58 AM   #3
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
FIXED IT!

The icon was anchored to the parent control and not to GuiRoot as it should have been...
  Reply With Quote
01/28/16, 10:27 AM   #4
haggen
 
haggen's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2015
Posts: 137
Originally Posted by Baertram View Post
FIXED IT!

The icon was anchored to the parent control and not to GuiRoot as it should have been...
Told ya it was anchoring problem! xD
  Reply With Quote
01/28/16, 11:35 AM   #5
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Yep, thanks. This was my first idea too as I had a similar poblem before.
But it was too late this morning so I just have overseen the "simple" anchor error
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Problem with texture - Only showing once


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