mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Center modal view message.
This commit is contained in:
parent
ac49726707
commit
65d2f263f2
@ -309,6 +309,12 @@ ModalMessageView::ModalMessageView(
|
||||
} });
|
||||
|
||||
text_message.set(message);
|
||||
|
||||
const int text_message_width = message.size() * 8;
|
||||
text_message.set_parent_rect({
|
||||
(240 - text_message_width) / 2, 7 * 16,
|
||||
text_message_width, 16
|
||||
});
|
||||
}
|
||||
|
||||
void ModalMessageView::focus() {
|
||||
|
@ -223,10 +223,7 @@ public:
|
||||
private:
|
||||
const std::string title_;
|
||||
|
||||
Text text_message {
|
||||
{ 0 * 8, 7 * 16, 30 * 8, 16 },
|
||||
""
|
||||
};
|
||||
Text text_message { };
|
||||
|
||||
Button button_done {
|
||||
{ 10 * 8, 13 * 16, 10 * 8, 24 },
|
||||
|
Loading…
Reference in New Issue
Block a user