aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/tattoo/widget_files.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sherlock/tattoo/widget_files.cpp')
-rw-r--r--engines/sherlock/tattoo/widget_files.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/sherlock/tattoo/widget_files.cpp b/engines/sherlock/tattoo/widget_files.cpp
index 7666e81480..5e877c53f4 100644
--- a/engines/sherlock/tattoo/widget_files.cpp
+++ b/engines/sherlock/tattoo/widget_files.cpp
@@ -54,7 +54,7 @@ void WidgetFiles::show(SaveMode mode) {
createSavegameList();
// Set up the display area
- _bounds = Common::Rect(SHERLOCK_SCREEN_WIDTH * 2 / 3, (_surface.fontHeight() + 1) *
+ _bounds = Common::Rect(SHERLOCK_SCREEN_WIDTH * 2 / 3, (_surface.fontHeight() + 1) *
(FILES_LINES_COUNT + 1) + 17);
_bounds.moveTo(mousePos.x - _bounds.width() / 2, mousePos.y - _bounds.height() / 2);
@@ -141,7 +141,7 @@ void WidgetFiles::render(FilesRenderMode mode) {
int xp = _surface.stringWidth("00.") + _surface.widestChar() + 5;
int yp = _surface.fontHeight() + 14;
-
+
for (int idx = _savegameIndex; idx < (_savegameIndex + FILES_LINES_COUNT); ++idx) {
if (idx == _selector && mode != RENDER_ALL)
color = COMMAND_HIGHLIGHTED;
@@ -150,7 +150,7 @@ void WidgetFiles::render(FilesRenderMode mode) {
if (mode == RENDER_NAMES_AND_SCROLLBAR)
_surface.fillRect(Common::Rect(4, yp, _surface.width() - BUTTON_SIZE - 9, yp + _surface.fontHeight()), TRANSPARENCY);
-
+
Common::String numStr = Common::String::format("%d.", idx + 1);
_surface.writeString(numStr, Common::Point(_surface.widestChar(), yp), color);
_surface.writeString(_savegames[idx], Common::Point(xp, yp), color);
@@ -170,7 +170,7 @@ void WidgetFiles::handleEvents() {
Common::KeyState keyState = ui._keyState;
// Handle scrollbar events
- ScrollHighlight oldHighlight = ui._scrollHighlight;
+ ScrollHighlight oldHighlight = ui._scrollHighlight;
handleScrollbarEvents(_savegameIndex, FILES_LINES_COUNT, _savegames.size());
int oldScrollIndex = _savegameIndex;
@@ -258,11 +258,11 @@ bool WidgetFiles::getFilename() {
assert(_selector != -1);
Common::Point pt(_surface.stringWidth("00.") + _surface.widestChar() + 5,
_surface.fontHeight() + 14 + (_selector - _savegameIndex) * (_surface.fontHeight() + 1));
-
+
Common::String numStr = Common::String::format("%d.", _selector + 1);
_surface.writeString(numStr, Common::Point(_surface.widestChar(), pt.y), COMMAND_HIGHLIGHTED);
- Common::String filename = _savegames[_selector];
+ Common::String filename = _savegames[_selector];
if (isSlotEmpty(_selector)) {
index = 0;
@@ -328,7 +328,7 @@ bool WidgetFiles::getFilename() {
_surface.writeString(filename.c_str() + index, pt, COMMAND_HIGHLIGHTED);
} else if ((keyState.keycode == Common::KEYCODE_LEFT && index > 0)
- || (keyState.keycode == Common::KEYCODE_RIGHT && index < 49 && pt.x < (_bounds.right - BUTTON_SIZE - 20))
+ || (keyState.keycode == Common::KEYCODE_RIGHT && index < 49 && pt.x < (_bounds.right - BUTTON_SIZE - 20))
|| (keyState.keycode == Common::KEYCODE_HOME && index > 0)
|| (keyState.keycode == Common::KEYCODE_END)) {
_surface.fillRect(Common::Rect(pt.x, pt.y, pt.x + width, pt.y + _surface.fontHeight()), TRANSPARENCY);
@@ -345,7 +345,7 @@ bool WidgetFiles::getFilename() {
pt.x += _surface.charWidth(filename[index]);
++index;
break;
-
+
case Common::KEYCODE_HOME:
pt.x = _surface.stringWidth("00.") + _surface.widestChar() + 5;
index = 0;
@@ -376,7 +376,7 @@ bool WidgetFiles::getFilename() {
_surface.fillRect(Common::Rect(pt.x, pt.y, _bounds.right - BUTTON_SIZE - 9, pt.y + _surface.fontHeight() - 1), TRANSPARENCY);
_surface.writeString(filename + index, pt, COMMAND_HIGHLIGHTED);
-
+
} else if (keyState.keycode == Common::KEYCODE_RETURN) {
done = 1;
@@ -393,7 +393,7 @@ bool WidgetFiles::getFilename() {
else
filename.setChar(keyState.ascii, index);
- _surface.fillRect(Common::Rect(pt.x, pt.y, _bounds.width() - BUTTON_SIZE - 9,
+ _surface.fillRect(Common::Rect(pt.x, pt.y, _bounds.width() - BUTTON_SIZE - 9,
pt.y + _surface.fontHeight() - 1), TRANSPARENCY);
_surface.writeString(filename.c_str() + index, pt, COMMAND_HIGHLIGHTED);
pt.x += _surface.charWidth(keyState.ascii);