Guys, is there a way to reset and force reinitialization of a tooltip control? Basically what I'm trying to do is to add different info to an item tooltip depending on which keys are pressed and I want to do it on-the-fly, i.e. when I mouse over an item in my inventory and get a tooltip then when I press Shift then I get some extra info added to this tooltip, when I release Shift the extra info has to go away. So far I was able only to add extra info to tooltip on Shift but I can not remove it. Was looking for functions that would allows me to force reset of this tooltip but could not find anything working. Any hints or ideas would be much appreciated.
ic, thank you for the idea! Right now I just use AddLine() to append text at the bottom of a tooltip to expand it's size, and which I can not hide. Now if I create a control and add it to the tooltip would it resize the tooltip accordingly to fit it in. The same for hiding, would it resize it back to "normal" size with my control hidden. The control I would have to add would be just a simple text box at this case.
AddLine() cannot removed without parsing the whole tooltip ... bad, only for oneshot-infos.
You should use AddControl() with your TextBox. A ClearAnchors() will remove it from the position and should resize the tooltip to its size before.
With the new CraftStore i use TopLevelControls and anchor them inside or outside the tooltip-control, because with AddControl() you can only use SetAnchor(CENTER). Disadvantage is, they must be hidden by a PreHook, because they not hide with the tooltip.
All good, now it's working as I want it to, though it wasn't as streight forward and I have imagined. Took a good 6 hours to debug everything and get it ready for release. The problem was with correct alignment of all controls and label so that when you hide all elements then a tooltip would be restored back to it's original size and layout. Plus there were couple of other issues with layout that I have to workaround. Anyway, all works now smoothly, will be releasing with the next version of Price Tracker. Thank you for the help!
All good, now it's working as I want it to, though it wasn't as streight forward and I have imagined. Took a good 6 hours to debug everything and get it ready for release. The problem was with correct alignment of all controls and label so that when you hide all elements then a tooltip would be restored back to it's original size and layout. Plus there were couple of other issues with layout that I have to workaround. Anyway, all works now smoothly, will be releasing with the next version of Price Tracker. Thank you for the help!
always when i here: update/new version of price tracker, i start to smile! thanks