better layout management
This commit is contained in:
parent
69f8a273f3
commit
a315d72a57
11 changed files with 86 additions and 79 deletions
|
|
@ -55,28 +55,17 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
static void configure_widget_default(PGPL_GuiWidget *widget) {
|
||||
pgpl_gui_widget_configure(widget, 0, 0, true, true, true, true,
|
||||
PGPL_GUI_FONT_SIZE_CONTENT, NULL, false, false,
|
||||
false, false);
|
||||
}
|
||||
|
||||
PGPL_GuiWidget *create_main_view() {
|
||||
PGPL_GuiButtonWidget *counter_button;
|
||||
PGPL_GuiTextWidget *counter;
|
||||
|
||||
column_layout = pgpl_gui_container_layout_create(
|
||||
PGPL_GUI_CONTAINER_LAYOUT_DIRECTION_VERTICAL);
|
||||
pgpl_gui_widget_configure(&column_layout->parent, 0, 0, true, true, false,
|
||||
false, PGPL_GUI_FONT_SIZE_CONTENT, NULL, false,
|
||||
true, true, false);
|
||||
|
||||
counter_button =
|
||||
pgpl_gui_button_widget_create("Click me!", on_counter_button_click);
|
||||
configure_widget_default(&counter_button->parent);
|
||||
|
||||
counter = pgpl_gui_text_widget_create(counter_buffer);
|
||||
configure_widget_default(&counter->parent);
|
||||
counter->parent.font_size = PGPL_GUI_FONT_SIZE_TITLE;
|
||||
counter->parent.background = false;
|
||||
counter->parent.border = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue