Code: Select all
int mp = device->getCursorControl()->getPosition();
// if mouse < x-320
if(mp <= 0,320)
{
driver->draw2DImage(sprite, rect<s32>(144,224,176,256),
rect<s32>(0,0,32,32), 0, 0, true);
}
// if mouse > x-320
if(mp >= 0,320)
{
driver->draw2DImage(sprite, rect<s32>(464,224,496,256),
rect<s32>(0,0,32,32), 0, 0, true);
Code: Select all
main.cpp(44) : error C2440: 'initializing' : cannot convert from 'irr::core::position2d<T>' to 'int'
1> with
1> [
1> T=irr::s32
1> ]
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Code: Select all
const position2d<s32> mp = device->getCursorControl()->getPosition();
Code: Select all
main.cpp(48) : error C2676: binary '<=' : 'const irr::core::position2d<T>' does not define this operator or a conversion to a type acceptable to the predefined operator
1> with
1> [
1> T=irr::s32
1> ]
1>c:\users\jason\desktop\irrdemos\mydemos\picturedraw1\picturedraw1\main.cpp(55) : error C2676: binary '>=' : 'const irr::core::position2d<T>' does not define this operator or a conversion to a type acceptable to the predefined operator
1> with
1> [
1> T=irr::s32
1> ]