bunnytrain Posted May 19, 2016 Share Posted May 19, 2016 (edited) I'm running into something, and I'm not sure what I'm doing wrong. Maybe someone here has solved the problem before? I'm trying to get tooltips to show up when you mouse-over a UIMechaListItem. Looking at the implementation of UIMechaListItem, I see two main calls being used: "BG.SetTooltipText(TooltipReason);" and "BG.RemoveTooltip();" So I tried to use those, but I'm getting a problem where BG.SetTooltipText doesn't actually make a tooltip appear. Calling BG.ProcessMouseEvents(), which is recommended in the UI guide in the SDK documentation, also doesn't seem to fix it. The UI guide suggests using "UIPanel.AddTextTooltip", but I also don't see that defined anywhere and get a compiler error when trying to use it. Maybe in the native UI class? The end result is that for settings in MCM, tooltips just don't show up on mouseover. I've dug a bit into the tooltip code to try to figure out why, but it seems like I may have to implement custom tooltips? Thanks in advance for any help! EDIT: Found the solution. See Post #6. Edited May 21, 2016 by bunnytrain Link to comment Share on other sites More sharing options...
Deleted32045420User Posted May 19, 2016 Share Posted May 19, 2016 (edited) Tooltips are annoying, what I was doing is using processMouseEvents() and then add tooltips but that just made my checkboxes unable to be checked... I just abandoned it in the end Edited May 19, 2016 by Guest Link to comment Share on other sites More sharing options...
Zyxpsilon Posted May 19, 2016 Share Posted May 19, 2016 Didn't Firaxis Devs stated via the usual change notes that the AH-Patch had resolved some weird issues with such Tooltip "functions"?This probably mean the old ways of accessing certain methods have been revised as well, no? IIRC, it's the sliders for (Anarchy assets & custom mods) that weren't responding correctly to the call instructions you are referring to. PS; I will soon have a proper mockup of the planned FLG options for you, but i first had to work (prepare release & design minimal documentation) on the "SwappImg" toolset with InfectedM... it's near completion while some more small test steps are still required before making it all official. :geek: Link to comment Share on other sites More sharing options...
bunnytrain Posted May 19, 2016 Author Share Posted May 19, 2016 Yeah, Zyxpsilon, there were some tooltip fixes in the patch specifically addressing missing tooltips in the options screen. Maybe I missed some important detail, but when I tried to replicate the setup on MCM's sliders, no tooltip shows up. I've searched through the entire call stack under UIPanel.SetTooltipText to try to figure out what's going on and eventually hit the black box point (native or Flash stuff). Again, maybe I just missed some important detail, but otherwise I'm a bit stumped. Link to comment Share on other sites More sharing options...
Hyperplexed Posted May 20, 2016 Share Posted May 20, 2016 weird, mine is working good (the SetDisabled calls SetTooltipText): WeightSlider = UIMechaListItem(UIMenu.List.CreateItem(class'UIMechaListItem')).InitListItem(); WeightSlider.SetWidgetType(EUILineItemType_Slider); WeightSlider.SetDisabled(true, "DISABLED: Immersive or Stat Progression modes enabled in config"); Link to comment Share on other sites More sharing options...
bunnytrain Posted May 21, 2016 Author Share Posted May 21, 2016 Based on what you said, I went back and tried something out. Turns out it was a very specific issue: UIPanel.SetTooltipText only seems to work if the panel you're calling it on is currently visible. Since MCM creates a bunch of UI elements that aren't immediately visible, it was hiding the panels after creating them, and that seemed to break the tooltips. So now every time a page of settings is pulled up, it just does a once-over and re-establishes the tooltips. Problem fixed! Link to comment Share on other sites More sharing options...
Zyxpsilon Posted May 21, 2016 Share Posted May 21, 2016 (edited) Speaking of shown & properly active Panels (glad you found the fix for ToolTips as those are essential for an "Options" device like yours, btw)... have you ever been able to determine if many or just a few more layers are actually isolated from a primary HUD stack. I came upon some weird issues while trying to access certain graphic assets with the qUIck_RCP mod. Technically, the RankIcons are customized & recolored for example. And the symptom goes like this; when a Gremlin is sent to hack whatever, the bottom-left corner shows the soldier's symbols --except-- for the replacer Rank-Icon!! Secondly, when i spike the Hooking task at the Save/Load screen (pulled from the Shell structure, IIRC) via the newest Base+Extension code (designed by InfectedM & I) of our "SwappImg" mod-combo... the custom Xcom_default (Texture) can't replace its counterpart. It's as if that area (or screen layer) isn't accessed at the same functional level as other core principles like Avenger/Strategy, Missions/Tactical or Geoscape/Events.Could be Flash.. could be scripted restrictions.. or another Unreal code mechanic altogether. I just can't figure it out yet.. but i must since a lot of other optional systems could be included in the "SwappImg" UC to handle these stubborn resources aside from the static stuff i'm currently able to address directly. Of course if anyone else reading this could supply precise details on such stuff, feel free to comment too. Edited May 21, 2016 by Zyxpsilon Link to comment Share on other sites More sharing options...
Recommended Posts