TWINE: allow higher resolutions for fullscreen texts

This commit is contained in:
Martin Gerhardy 2021-01-02 12:20:54 +01:00
parent 49deb7e210
commit d6dbbe7b24

View file

@ -736,25 +736,29 @@ bool Text::getMenuText(int32 index, char *text, uint32 textSize) {
} }
void Text::textClipFull() { void Text::textClipFull() {
const int padding = 9; const int32 margin = 8;
_dialTextBox.left = padding - 1; const int32 padding = 8;
_dialTextBox.top = padding - 1; _dialTextBox.left = margin;
_dialTextBox.right = SCREEN_WIDTH - padding; _dialTextBox.top = margin;
_dialTextBox.bottom = SCREEN_HEIGHT - padding; _dialTextBox.right = SCREEN_WIDTH - margin;
_dialTextBox.bottom = SCREEN_HEIGHT - margin;
_dialTextBoxLines = 11; _dialTextBoxLines = (int32)(_dialTextBox.height() / _lineHeight) - 1;
_dialTextBoxMaxX = SCREEN_WIDTH - 33; _dialTextBoxMaxX = SCREEN_WIDTH - 2 * margin - 2 * padding;
} }
void Text::textClipSmall() { void Text::textClipSmall() {
const int padding = 17; const int32 margin = 16;
_dialTextBox.left = padding - 1; const int32 padding = 8;
_dialTextBox.top = SCREEN_HEIGHT - 146;
_dialTextBox.right = SCREEN_WIDTH - padding;
_dialTextBox.bottom = SCREEN_HEIGHT - padding;
_dialTextBoxLines = 3; _dialTextBoxLines = 3;
_dialTextBoxMaxX = SCREEN_WIDTH - 49; const int32 textHeight = _dialTextBoxLines * _lineHeight;
_dialTextBox.left = margin;
_dialTextBox.top = SCREEN_HEIGHT - textHeight - margin - padding;
_dialTextBox.right = SCREEN_WIDTH - margin;
_dialTextBox.bottom = SCREEN_HEIGHT - margin;
_dialTextBoxMaxX = SCREEN_WIDTH - 2 * margin + 2 * padding;
} }
void Text::drawAskQuestion(int32 index) { void Text::drawAskQuestion(int32 index) {