Garry's Mod Wiki

Revision Difference

Panel:SetTooltipPanelOverride#528022

<function name="SetTooltipPanelOverride" parent="Panel" type="classfunc"> <description> Sets the panel class to be created instead of <page>DTooltip</page> when the player hovers over this panel and a tooltip needs creating. </description> <realm>Client</realm> <added>2020.04.29</added>⤶ <args> <arg name="override" type="string">The panel class to override the default <page>DTooltip</page>. The new panel class must have the following methods: * <page text="SetText">Panel:SetText</page> - If you are using <page>Panel:SetTooltip</page>. * <page text="SetContents">DTooltip:SetContents</page> - If you are using <page>Panel:SetTooltipPanel</page>. * <page text="OpenForPanel">DTooltip:OpenForPanel</page> - A "hook" type function that gets called shortly after creation (and after the above 2) to open and position the tooltip. You can see this logic in `lua/includes/util/tooltips.lua`. </arg> </args> </function>