Hi all,
A very simple label example code don't execute in the MoRE emulator (just the background color appear). Only examples in MoSync execute.
Here is the code and tell me please why i don't see a label on the screen:
---------------------------------------
#include
#include
#include
using namespace MAUtil;
using namespace MAUI;
class MyScreen : public Screen {
public:
MyScreen() {
Label *l=new Label(0,0,50,50,NULL);
l->setBackgroundColor(0x0e419f);
l->setCaption("Welcome Eric");
setMain(l);
}
~MyScreen() {
// todo: delete main widget of this screen
}
void keyPressEvent(int keycode){
if(keycode==MAK_5)
maExit(0);
}
private:
};
class MAUIMoblet : public Moblet {
public:
MAUIMoblet() {
// initialize
screen = new MyScreen();
screen->show();
}
void keyPressEvent(int keyCode, int nativeCode) {
// todo: handle key presses
}
void keyReleaseEvent(int keyCode, int nativeCode) {
// todo: handle key releases
}
MyScreen* screen;
~MAUIMoblet() {
delete screen;
}
};
extern "C" int MAMain() {
Moblet::run(new MAUIMoblet());
return 0;
};