new ToolTip vs. defaultToolTip for buttons not working as expected
Posted: Fri Sep 21, 2018 3:01 pm
I found - what I think is a issue with ToolTip class and Button (not TextLabel - there ToolTip works as expected):
this works (tool tip shows on hover over button):
this does not (tool tips never show up - it seems that in function BaseScreenComponent.Draw the value mouseOverComponent is always false for some reason):
So basically using defaultToolTip does work, using a custom tooltip does not work.
As mentioned above TextLabel class allows custom ToolTips to be used.
Is this a bug or am I doing something wrong?
this works (tool tip shows on hover over button):
Code: Select all
buttonToolTip = defaultToolTip;
buttonToolTip.Parent = NativePanel;
aButton = DaggerfallUI.AddButton(new Rect(78, 171, 27, 19), NativePanel);
aButton.ToolTip = buttonToolTip;
aButton.ToolTipText = "this is a tool tip";
Code: Select all
buttonToolTip = new ToolTip();
buttonToolTip.CloneSettings(defaultToolTip);
buttonToolTip.Parent = NativePanel;
aButton = DaggerfallUI.AddButton(new Rect(78, 171, 27, 19), NativePanel);
aButton.ToolTip = buttonToolTip;
aButton.ToolTipText = "this is a tool tip";
As mentioned above TextLabel class allows custom ToolTips to be used.
Is this a bug or am I doing something wrong?