reworked layout
This commit is contained in:
parent
0948708050
commit
6fe3ce8787
4 changed files with 231 additions and 170 deletions
22
test/main.c
22
test/main.c
|
|
@ -191,33 +191,35 @@ int main(void)
|
|||
// ug_container_remove(ctx, "Menu fichissimo");
|
||||
//}
|
||||
|
||||
//ug_container_floating(ctx, "stupid name", (ug_div_t){.x=SIZE_PX(0), .y=SIZE_PX(0), .w=SIZE_PX(100), .h=SIZE_MM(75.0)});
|
||||
ug_container_floating(ctx, "stupid name", (ug_div_t){.x=SIZE_PX(0), .y=SIZE_PX(0), .w=SIZE_PX(100), .h=SIZE_MM(75.0)});
|
||||
|
||||
//ug_container_floating(ctx, "floating windoooooooow", (ug_div_t){.x=SIZE_PX(100), .y=SIZE_PX(0), .w=SIZE_PX(100), .h=SIZE_MM(75.0)});
|
||||
|
||||
//ug_container_sidebar(ctx, "Right Sidebar", (ug_size_t)SIZE_PX(300), UG_SIDE_RIGHT);
|
||||
//ug_container_sidebar(ctx, "Left Sidebar", (ug_size_t)SIZE_PX(200), UG_SIDE_LEFT);
|
||||
//ug_container_sidebar(ctx, "Bottom Sidebar", (ug_size_t)SIZE_MM(10), UG_SIDE_BOTTOM);
|
||||
//ug_container_sidebar(ctx, "Top Sidebar", (ug_size_t)SIZE_MM(40), UG_SIDE_TOP);
|
||||
ug_container_sidebar(ctx, "Top Sidebar", (ug_size_t)SIZE_MM(40), UG_SIDE_TOP);
|
||||
|
||||
// ug_container_popup(ctx, "Annoying popup", (ug_div_t){.x=SIZE_MM(150), .y=SIZE_MM(150), .w=SIZE_PX(100), .h=SIZE_MM(75.0)});
|
||||
|
||||
ug_container_body(ctx, "Main Body");
|
||||
//ug_container_body(ctx, "Main Body");
|
||||
//if (ug_container_body(ctx, "Other Body"))
|
||||
// printf("No space!\n");
|
||||
|
||||
ug_layout_row(ctx);
|
||||
|
||||
ug_layout_row(ctx);
|
||||
ug_layout_column(ctx);
|
||||
ug_element_button(ctx, "button 1", "hey", (ug_div_t){SQUARE(SIZE_MM(10))});
|
||||
ug_element_button(ctx, "button 2", "lol", (ug_div_t){SQUARE(SIZE_MM(10))});
|
||||
ug_layout_next_row(ctx);
|
||||
ug_element_button(ctx, "button 3", "L", (ug_div_t){SQUARE(SIZE_MM(10))});
|
||||
ug_element_button(ctx, "button 4", "69", (ug_div_t){SQUARE(SIZE_MM(10))});
|
||||
ug_layout_next_row(ctx);
|
||||
//ug_element_button(ctx, "button 2", "lol", (ug_div_t){SQUARE(SIZE_MM(10))});
|
||||
//ug_layout_next_row(ctx);
|
||||
//ug_element_button(ctx, "button 3", "L", (ug_div_t){SQUARE(SIZE_MM(10))});
|
||||
//ug_element_button(ctx, "button 4", "69", (ug_div_t){SQUARE(SIZE_MM(10))});
|
||||
ug_layout_next_column(ctx);
|
||||
ug_element_button(ctx, "button 5", "lmao", (ug_div_t){SQUARE(SIZE_MM(10))});
|
||||
ug_element_textbtn(ctx, "text button 1", "foo", (ug_div_t){SQUARE(SIZE_MM(10))});
|
||||
//ug_element_textbtn(ctx, "text button 1", "foo", (ug_div_t){.w = 0, .h = SIZE_PX(30)});
|
||||
//ug_element_button(ctx, "button 6", "", (ug_div_t){SQUARE(SIZE_MM(10)),.x=SIZE_PX(-10)});
|
||||
|
||||
ug_container_body(ctx, "fill body");
|
||||
|
||||
ug_frame_end(ctx);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue