Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toast manager api improvements related to #374 #376

Merged
merged 4 commits into from
Dec 10, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update TestToasts to include top/bottom center alignment options (#374)
bploeckelman committed Dec 10, 2022
commit d09157449c1e8c7d6ee86d9e35e6675b77d61957
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ public void resize () {
});

final VisSelectBox<String> alignment = new VisSelectBox<String>();
alignment.setItems("top left", "top right", "bottom left", "bottom right");
alignment.setItems("top left", "top right", "top center", "bottom left", "bottom right", "bottom center");
alignment.setSelectedIndex(1);
alignment.addListener(new ChangeListener() {
@Override
@@ -63,11 +63,17 @@ public void changed (ChangeEvent event, Actor actor) {
toastManager.setAlignment(Align.topRight);
break;
case 2:
toastManager.setAlignment(Align.bottomLeft);
toastManager.setAlignment(Align.top | Align.center);
break;
case 3:
toastManager.setAlignment(Align.bottomLeft);
break;
case 4:
toastManager.setAlignment(Align.bottomRight);
break;
case 5:
toastManager.setAlignment(Align.bottom | Align.center);
break;
}
}
});