Search found 5 matches

by Json
Sun Dec 12, 2004 4:07 pm
Forum: Beginners Help
Topic: No GUI events triggered
Replies: 9
Views: 769

hmm, I just had that as well, I used:


MyEventReceiver receiver;
device->setEventReceiver(&receiver);


but I put it in my own spot, then I put it in between the createdevice and getVideoDriver and it worked, but now im having another problem where nothing happens when I click the buttons. The ...
by Json
Tue Dec 07, 2004 2:57 pm
Forum: Beginners Help
Topic: HUD need to be transparent
Replies: 11
Views: 1303

Hi!

As far as I know the keycolor method is used to specify what color in the texture that should not be drawn. If you want textures to be transparent you need to use the alphalayer of the image.

Never tried this myself but many people seem to look for how to draw HUDs and making them transparent ...
by Json
Tue Dec 07, 2004 2:51 pm
Forum: Beginners Help
Topic: Putting a crosshair in
Replies: 6
Views: 921


// Load the image
tImage = driver->getTexture("crosshair.bmp");

// Set keycolor
driver->makeColorKeyTexture(tImage, position2d<s32>(0,0));

// Draw crosshair
driver->draw2DImage(tImage, position2d<s32>(iPositionX, iPositionY), rect<s32>(0, 0, 32, 32), 0, SColor(255,255,255,255), true ...
by Json
Tue Dec 07, 2004 2:39 pm
Forum: Beginners Help
Topic: 2d help
Replies: 1
Views: 213

by Json
Tue Dec 07, 2004 2:36 pm
Forum: Beginners Help
Topic: HUD HELP PLZ!
Replies: 1
Views: 282

Personally Im just making a 2D game but drawing to the screen goes sort of like this:


// Load the image
sPlayer.tImage = gZomfg->gDevice->getVideoDriver()->getTexture("images/pacman.bmp");

// Set keycolor
gZomfg->gDevice->getVideoDriver()->makeColorKeyTexture(sPlayer.tImage, position2d<s32 ...