ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
I need to do simple coloured buttons to my rollout just like the thepupettool script. I know I can do it with images, but I only need a fast and simple way to changes solid colors. Any Idea?
If you don't want to go the dotnet way, you can just change the .images property of button or use imgtag instead and change its .bitmap property (and you don't have to deal with the #(bitmap, alpha, 1,1,1,1,1) definition and get some extra functions as a bonus). For example:
try destroyDialog test catch()
rollout test "Test" width:200
(
progressBar pbFrame width:52 height:22 enabled:false
imgTag itColorful bitmap:(bitmap 5020 color:red) pos:(pbFrame.pos+[1,1]) across:2
colorPicker cpChangeColor "Change color:" color:red width:115 pos:[75,6]
on cpChangeColor changed val do
itColorful.bitmap = bitmap 1 1 color:val
on itColorful click doprint cpChangeColor.color
)
createDialog test
Note that I used a disabled progressbar to frame the imgtag. That was just to give it some kind of a border and is quite hacky but it works...
Comments
If you don't want to go the
If you don't want to go the dotnet way, you can just change the .images property of button or use imgtag instead and change its .bitmap property (and you don't have to deal with the #(bitmap, alpha, 1,1,1,1,1) definition and get some extra functions as a bonus). For example:
Note that I used a disabled progressbar to frame the imgtag. That was just to give it some kind of a border and is quite hacky but it works...
Some of my scripts and MCGs :: 3ds Max SDK Intro for Scripters