SAGA2: Rename class variables in uidialog.h

This commit is contained in:
Eugene Sandulenko 2022-09-27 17:32:59 +02:00
parent 8a35749334
commit 2865f33aa3
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
2 changed files with 39 additions and 39 deletions

View File

@ -1257,8 +1257,8 @@ CPlacardWindow::CPlacardWindow(
textPallete &pal,
gFont *font) :
ModalWindow(r, ident, cmd) {
textPal = pal;
textFont = font;
_textPal = pal;
_textFont = font;
positionText(windowText, Rect16(0, 0, r.width, r.height));
}
@ -1271,31 +1271,31 @@ void CPlacardWindow::positionText(
yPos,
maxY;
int16 fontHeight = textFont->height;
int16 fontHeight = _textFont->height;
// make a copy of the window text string
sprintf(titleBuf, "%s", windowText);
sprintf(_titleBuf, "%s", windowText);
// break up the title text string
titleCount = SplitString(titleBuf, titleStrings, maxLines, '\n');
_titleCount = SplitString(_titleBuf, _titleStrings, maxLines, '\n');
yPos = textArea.y +
((textArea.height - titleCount * fontHeight) >> 1);
((textArea.height - _titleCount * fontHeight) >> 1);
yPos = MAX(yPos, textArea.y);
maxY = textArea.y + textArea.height - fontHeight;
for (i = 0; i < titleCount; i++, yPos += fontHeight) {
for (i = 0; i < _titleCount; i++, yPos += fontHeight) {
if (yPos < maxY) {
titlePos[i].y = yPos;
titlePos[i].x =
_titlePos[i].y = yPos;
_titlePos[i].x =
textArea.x +
((textArea.width -
TextWidth(textFont, titleStrings[i], -1, 0))
TextWidth(_textFont, _titleStrings[i], -1, 0))
>> 1);
} else titleCount = i;
} else _titleCount = i;
}
} else titleCount = 0;
} else _titleCount = 0;
}
int16 CPlacardWindow:: SplitString(
@ -1354,16 +1354,16 @@ void CPlacardWindow::drawClipped(
rect.width = _extent.width;
rect.height = _extent.height;
for (i = 0; i < titleCount; i++) {
Point16 textPos = origin + titlePos[i];
for (i = 0; i < _titleCount; i++) {
Point16 textPos = origin + _titlePos[i];
writePlaqTextPos(port,
textPos,
textFont,
_textFont,
0,
textPal,
_textPal,
false,
titleStrings[i]);
_titleStrings[i]);
}
}
@ -1385,28 +1385,28 @@ void CPlacardPanel::positionText(const char *windowText, const Rect16 &textArea)
int16 fontHeight = _buttonFont->height;
// make a copy of the window text string
sprintf(titleBuf, "%s", windowText);
sprintf(_titleBuf, "%s", windowText);
// break up the title text string
titleCount = SplitString(titleBuf, titleStrings, maxLines, '\n');
_titleCount = SplitString(_titleBuf, _titleStrings, maxLines, '\n');
yPos = textArea.y +
((textArea.height - titleCount * fontHeight) >> 1);
((textArea.height - _titleCount * fontHeight) >> 1);
yPos = MAX(yPos, textArea.y);
maxY = textArea.y + textArea.height - fontHeight;
for (i = 0; i < titleCount; i++, yPos += fontHeight) {
for (i = 0; i < _titleCount; i++, yPos += fontHeight) {
if (yPos < maxY) {
titlePos[i].y = yPos;
titlePos[i].x =
_titlePos[i].y = yPos;
_titlePos[i].x =
textArea.x +
((textArea.width -
TextWidth(_buttonFont, titleStrings[i], -1, 0))
TextWidth(_buttonFont, _titleStrings[i], -1, 0))
>> 1);
} else titleCount = i;
} else _titleCount = i;
}
} else titleCount = 0;
} else _titleCount = 0;
}
int16 CPlacardPanel:: SplitString(
@ -1445,8 +1445,8 @@ void CPlacardPanel::drawClipped(
rect.width = _extent.width;
rect.height = _extent.height;
for (i = 0; i < titleCount; i++) {
Point16 textPos = origin + titlePos[i];
for (i = 0; i < _titleCount; i++) {
Point16 textPos = origin + _titlePos[i];
writePlaqTextPos(port,
textPos,
@ -1454,7 +1454,7 @@ void CPlacardPanel::drawClipped(
0,
_textFacePal,
false,
titleStrings[i]);
_titleStrings[i]);
}
}

View File

@ -81,13 +81,13 @@ private:
maxText = 512
};
int16 titleCount;
Point16 titlePos[maxLines];
char *titleStrings[maxLines];
char titleBuf[maxText];
int16 _titleCount;
Point16 _titlePos[maxLines];
char *_titleStrings[maxLines];
char _titleBuf[maxText];
textPallete textPal;
gFont *textFont;
textPallete _textPal;
gFont *_textFont;
void positionText(
char *windowText,
@ -122,10 +122,10 @@ class CPlacardPanel : public CPlaqText {
maxText = 512
};
int16 titleCount;
Point16 titlePos[maxLines];
char *titleStrings[maxLines];
char titleBuf[maxText];
int16 _titleCount;
Point16 _titlePos[maxLines];
char *_titleStrings[maxLines];
char _titleBuf[maxText];
void positionText(const char *windowText, const Rect16 &textArea);