[Closed] Changing Rollout Colour
Is it possible to change the colour of individual rollouts in rollout floaters?
I see that Light did it in OrionFlame 0.3 but I don’t know if they’re actually rollouts or some other sort of cunning thing.
Thanks.
Hey, you need to have a Dialog floater to do it, not a rolloutfloater. Then you can use a bitmap as backround.
Good luck,
CML
Keith,
If you are talking about LOF Panel, then good guess! It is not a rollout floater. What do you want to change the color of? If you want to change the background color, you can do this in 2 ways:
- Change the global background color. But it also updates the rest of the max’s colors.
- Use bgColor parameter of a dialog [IE createDialog new “new” 300 200 bgColor:red]
Light
Light: I mean the way the titles of your rollouts change colour as you hover over them and when they’re opened.
You will need to use bitmaps which change their colors based on the current mouse position. You also need to take relative mouse position [to the dialog] into account so you can presume on which bitmap the mouse might currently be.
Light
Sorry, now I’m a bit lost.
Are you using subRollouts in the dialog?
Or are they custom controls cunningly made with bitmap controls?
No sub rollouts. The visible parts are bitmaps while the invisible parts are actually buttons. But it looks like a real rollout floater, doesn’t it?
Light
It actually looks much better And of course some of the advantages are quite apparent (RCMenus, Background bitmaps, mouse move/lbutton/rbutton states, to mention a few).
But how do you add and remove the controls?
Do you just use .visible and some cunning control shuffling?
Did you make wrappers to automate this process? Hard coding that for each control must be a mission and a half!
All controls [there are 379 of them] are present in the dialog. And yes I have used the visible property of them. I have also written a few fns to automate the process or it would be a nightmare to add new controls to it.
To add a new control, I simply define the control as usual and place it to the right position. All the showing, hiding, sliding, etc are taken care of by the fns [hopefully].
I have made a lot of assumptions in the fns in order to avoid large number of codes. So for each “rollout” there is only 1 line that triggers other fns appropriately.
Light