Icons Loading in Game Play Camera

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Radnussrini
Posts: 14
Joined: Tue Oct 10, 2006 5:58 am

Icons Loading in Game Play Camera

Post by Radnussrini »

I try to load the images to the left and right side of the screen
my code is :
gui::IGUIEnvironment* left =envimg->addImage(driver->getTexture("../../media/images.bmp"),
core::position2d<s32>(10,100));

gui::IGUIEnvironment* right=envimg->addImage( driver->getTexture("../../media/images.tga"),
core::position2d<s32>(520,200));

But the error is
Error 2 error C2440: 'initializing' : cannot convert from 'irr::gui::IGUIImage *' to 'irr::gui::IGUIEnvironment
anyone guide me i tried througt the basis the icon basics. i cant move on

PLZ HELP
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

This is not really an Irrlicht question, it is more of a general C/C++ question. It most definitely does not belong in the advanced forum, and you could probably have answered it on your own with 5 minutes of looking through the documentation.

You are declaring left and right of the wrong types. You need to use gui::IGUIImage instead of gui::IGUIEnvironment.
Post Reply