mirror of
https://github.com/Kapendev/parin.git
synced 2025-04-26 04:59:54 +03:00
Made UI options small and split the text field.
This commit is contained in:
parent
c1377e301d
commit
1c23914aba
6 changed files with 52 additions and 65 deletions
|
@ -15,7 +15,7 @@ bool myButton(IStr text) {
|
|||
} else {
|
||||
drawTextureArea(atlas, Rect(uiItemSize), uiItemPoint, DrawOptions(gray1));
|
||||
}
|
||||
drawUiText(uiItemSize, text, uiItemPoint, UiButtonOptions(Alignment.left, 6));
|
||||
drawUiText(uiItemSize, text, uiItemPoint, UiOptions(Alignment.left, 6));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import parin;
|
||||
|
||||
auto handlePosition = Vec2(120, 60);
|
||||
auto handleOptions = UiButtonOptions();
|
||||
auto handleOptions = UiOptions();
|
||||
|
||||
void ready() {
|
||||
lockResolution(320, 180);
|
||||
|
|
|
@ -17,11 +17,11 @@ bool update(float dt) {
|
|||
setUiStartPoint(Vec2(8));
|
||||
// Create a horizontal layout for arranging subsequent UI items.
|
||||
useUiLayout(Layout.h);
|
||||
uiText(textSize, "Cool Button", UiButtonOptions(Alignment.left));
|
||||
uiText(textSize, "Cool Button", UiOptions(Alignment.left));
|
||||
if (uiButton(buttonSize, "")) println("Cool");
|
||||
// Create a new horizontal layout under the previous layout.
|
||||
useUiLayout(Layout.h);
|
||||
uiText(textSize, "Super Button", UiButtonOptions(Alignment.left));
|
||||
uiText(textSize, "Super Button", UiOptions(Alignment.left));
|
||||
if (uiButton(buttonSize, "")) println("Super");
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue