wip
This commit is contained in:
parent
76a33f9395
commit
ae7df4cb63
52 changed files with 1818 additions and 39 deletions
37
test.cxx
Normal file
37
test.cxx
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#include <MwCXX/Core.h>
|
||||
#include <MwCXX/Widget/Window.h>
|
||||
#include <MwCXX/Widget/Button.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
class MyButton : public MwCXX::Button {
|
||||
protected:
|
||||
void OnActivate() {
|
||||
std::cout << "Hello" << std::endl;
|
||||
}
|
||||
|
||||
public:
|
||||
MWCXX_CONSTRUCTOR(MyButton, MwCXX::Button) {
|
||||
this->SetText("Hello, world!");
|
||||
}
|
||||
};
|
||||
|
||||
class MyWindow : public MwCXX::Window {
|
||||
private:
|
||||
MyButton* epic;
|
||||
|
||||
public:
|
||||
MWCXX_CONSTRUCTOR(MyWindow, MwCXX::Window) {
|
||||
this->epic = new MyButton("epic app", this, 10, 10, 640 - 10 * 2, 480 - 10 * 2);
|
||||
}
|
||||
};
|
||||
|
||||
int main() {
|
||||
MyWindow* wnd;
|
||||
|
||||
MwCXX::Init();
|
||||
|
||||
wnd = new MyWindow("epic app", NULL, MwDEFAULT, MwDEFAULT, 640, 480);
|
||||
|
||||
wnd->Loop();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue