This only affects the brightness when the button is .highlight()'ed - a more permanent, non-mouse-over state like e.g. for the currently-selected tab in a UI with several tabs.
Huh, turns out I was woefully mistaken about the very nature of the methods I was calling. Perhaps some form of short hint-like Javadoc in ButtonAPI could be of use for the future modders like me?
Although, what moved me to tinker with highlight brightness was the fact that there appeared to be next to no difference in button color when mousing over it, because I called highlight() on it right after creation, so I thought mouseover is what highlight() is for, said highlight being a manual call to the mouseover state. Testing again right now:
Creating ButtonAPI like this:
ButtonAPI toggleButtonInstance = capacityPanel.addButton(status, null,
Misc.getBasePlayerColor(), Misc.getDarkPlayerColor(), Alignment.MID,
CutStyle.ALL, 75f, 25f, 2f);
if (capacity.isToggledOn()) {
toggleButtonInstance.highlight();
}
Two relevant colors are base player and dark player colors. Button is immediately recreated on click via remove/add parent component, so gets created in a finished state. Such a setup produces an unsatisfactory result
with almost no visual telling if button is moused over, see attached picture. I am able to work around this (not to perfect satisfaction, sadly), just thought it might be thought-provoking.
Edit: excuse my poor wording, problem was a bit different: color of the button is identical when mousing over it whether it is in an enabled or disabled state. That's what I deemed unsatisfactory at the time, perhaps the issue is in the eye of the beholder. Indeed, thinking it over and everything makes plenty of sense - tab buttons are supposed to be like this, and for having one button for disable/enable there are area checkboxes. My fault, sorry!
Let me add:
float getGlowBrightness();
void setGlowBrightness(float glowBrightness);
To ButtonAPI.
You are my hero, sir!
I'm fairly sure the tooltip background is generally just a black quad. In places where it's not, generally something like graphics/fx/scanline11.png would be used. I wouldn't use GL11 lines for something like this, no - it's a lot of lines and the performance impact would generally be significant.
I see, thank you. Now thinking about it, can't even recall where I got this idea that something had that striped background...
[attachment deleted by admin]