Added some more tests to Page 2: label alignment and menued and menuless windows are on the menu here.

This commit is contained in:
Pietro Gagliardi 2015-04-30 12:00:21 -04:00
parent 4c1b281b79
commit 62f4461c51
1 changed files with 15 additions and 0 deletions

View File

@ -34,6 +34,11 @@ static void movePage1(uiButton *b, void *data)
moveBack = 1;
}
static void openAnotherWindow(uiButton *b, void *data)
{
uiControlShow(uiControl(uiNewWindow("Another Window", 100, 100, data != NULL)));
}
uiBox *makePage2(void)
{
uiBox *page2;
@ -68,5 +73,15 @@ uiBox *makePage2(void)
uiBoxAppend(page2, uiControl(hbox), 0);
moveBack = 0;
hbox = newHorizontalBox();
uiBoxAppend(hbox, uiControl(uiNewLabel("Label Alignment Test")), 0);
button = uiNewButton("Open Menued Window");
uiButtonOnClicked(button, openAnotherWindow, button);
uiBoxAppend(hbox, uiControl(button), 0);
button = uiNewButton("Open Menuless Window");
uiButtonOnClicked(button, openAnotherWindow, NULL);
uiBoxAppend(hbox, uiControl(button), 0);
uiBoxAppend(page2, uiControl(hbox), 0);
return page2;
}