parent
abc86aaa8f
commit
2ede2f4928
|
@ -35,7 +35,8 @@ typedef struct Lth_Window
|
|||
|
||||
// Extern Functions ----------------------------------------------------------|
|
||||
|
||||
Lth_Window *Lth_WindowNew(char const *title, int w, int h, int x, int y);
|
||||
[[__optional_args(2)]]
|
||||
Lth_Window *Lth_WindowNew(char const *title, int x, int y, int w, int h);
|
||||
void Lth_WindowSetTitle(Lth_Window *ctrl, char const *title);
|
||||
|
||||
#endif//lithos3__Lth_window_h
|
||||
|
|
|
@ -22,12 +22,19 @@
|
|||
static void main()
|
||||
{
|
||||
Lth_Context *ctx = Lth_ContextNew(320, 200, 0x5000, 0x1000);
|
||||
Lth_Window *window[2] = {
|
||||
Lth_WindowNew("test window", 50, 100, 30, 30),
|
||||
Lth_WindowNew("test window 2", 100, 100, -1, -1)
|
||||
|
||||
Lth_ContextManifestLoad_extern(ctx, "lithos_fs/Base.lthm");
|
||||
|
||||
ctx->mapspace.x = ctx->mapspace.y = 32;
|
||||
|
||||
Lth_Window *window[] = {
|
||||
Lth_WindowNew("test window", -1, -1, 50, 100),
|
||||
Lth_WindowNew("test window 2", -1, -1, 100, 100),
|
||||
Lth_WindowNew("test window 3", -1, -1, 100, 30),
|
||||
Lth_WindowNew("test window 4", -1, -1, 100, 100),
|
||||
};
|
||||
|
||||
for(int i = 0; i < 2; i++)
|
||||
for(int i = 0; i < sizeof(window) / sizeof(*window); i++)
|
||||
Lth_ContextMap(ctx, window[i]);
|
||||
|
||||
ACS_Delay(1);
|
||||
|
|
|
@ -58,7 +58,7 @@ static void Lth_WindowDestroy(Lth_Window *ctrl)
|
|||
//
|
||||
// Lth_WindowNew
|
||||
//
|
||||
Lth_Window *Lth_WindowNew(char const *title, int w, int h, int x, int y)
|
||||
Lth_Window *Lth_WindowNew(char const *title, int x, int y, int w, int h)
|
||||
{
|
||||
Lth_Window *ctrl = calloc(1, sizeof(Lth_Window));
|
||||
Lth_assert(ctrl != NULL);
|
||||
|
|
Loading…
Reference in New Issue