53 lines
No EOL
784 B
C++
53 lines
No EOL
784 B
C++
|
|
#include "hal/hal.h"
|
|
#include "node.h"
|
|
#include "gfx/layout.h"
|
|
|
|
|
|
#include "example.h"
|
|
|
|
#include "gfx/screen.h"
|
|
#include "gfx/canvas.h"
|
|
|
|
#ifdef LINUX
|
|
#include <SDL2/SDL.h>
|
|
#include <stdio.h>
|
|
|
|
|
|
extern SDL_Window* window;
|
|
extern SDL_Event event;
|
|
extern SDL_Renderer *renderer;
|
|
|
|
#endif
|
|
|
|
|
|
screen s(128,32);
|
|
layout l(s);
|
|
menu* root;
|
|
|
|
int main() {
|
|
|
|
root = new menu("",
|
|
new menu("fooa",
|
|
new menu("foob",
|
|
new menu("fooc", new fooValue("FOOd",5))
|
|
),
|
|
new menu("foo", new fooValue("BAR",5)),
|
|
new menu("foo", new fooValue("BAZ",5))
|
|
),
|
|
new menu("blub", new blubValue("BLUB",5)),
|
|
new menu("blub", new blubValue("BLUB",5)),
|
|
new menu("blub", new blubValue("BLUB",5))
|
|
);
|
|
|
|
hal_init();
|
|
hal_render();
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
void render(){
|
|
l.apply(root);
|
|
l.render();
|
|
} |