GuiBitmapButtonCtrl - Add modulationColor.
by Orion Elenzil · 05/14/2008 (8:25 am) · 1 comments
Add modulationColor to guiBitmapButtonCtrl.
This is most useful for adjusting the overall transparency of a button.
This is based on a TGE 1.3.5 codebase, but probably applies to TGE 1.X.
Familiarity w/ C++ is assumed.
guiBitmapCtrl.h
right before this stuff:
GuiBitmapButtonCtrl.cc
in the constructor, GuiBitmapButtonCtrl::GuiBitmapButtonCtrl(),
add:
in GuiBitmapButtonCtrl::initPersistFields(),
add:
in GuiBitmapButtonCtrl::renderButton(),
change this:
okay!
easy i know!
okay!
This is most useful for adjusting the overall transparency of a button.
This is based on a TGE 1.3.5 codebase, but probably applies to TGE 1.X.
Familiarity w/ C++ is assumed.
guiBitmapCtrl.h
right before this stuff:
[i] public: DECLARE_CONOBJECT(GuiBitmapButtonCtrl); [/i]add this:
public: ColorI mModulationColor;
GuiBitmapButtonCtrl.cc
in the constructor, GuiBitmapButtonCtrl::GuiBitmapButtonCtrl(),
add:
mModulationColor = ColorI(255, 255, 255, 255);
in GuiBitmapButtonCtrl::initPersistFields(),
add:
addField("modulationColor", TypeColorI , Offset(mModulationColor, GuiBitmapButtonCtrl));in GuiBitmapButtonCtrl::renderButton(),
change this:
dglClearBitmapModulation();to this:
dglSetBitmapModulation(mModulationColor);
okay!
easy i know!
okay!
About the author

Torque 3D Owner Kevin Rogers