[Scummvm-cvs-logs] SF.net SVN: scummvm:[48241] scummvm/trunk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Mar 12 00:41:29 CET 2010
Revision: 48241
http://scummvm.svn.sourceforge.net/scummvm/?rev=48241&view=rev
Author: fingolfin
Date: 2010-03-11 23:41:28 +0000 (Thu, 11 Mar 2010)
Log Message:
-----------
GUI: Remove GuiObject::getMillis()
Modified Paths:
--------------
scummvm/trunk/engines/scumm/dialogs.cpp
scummvm/trunk/gui/ListWidget.cpp
scummvm/trunk/gui/PopUpWidget.cpp
scummvm/trunk/gui/about.cpp
scummvm/trunk/gui/editable.cpp
scummvm/trunk/gui/message.cpp
scummvm/trunk/gui/object.cpp
scummvm/trunk/gui/object.h
Modified: scummvm/trunk/engines/scumm/dialogs.cpp
===================================================================
--- scummvm/trunk/engines/scumm/dialogs.cpp 2010-03-11 23:40:40 UTC (rev 48240)
+++ scummvm/trunk/engines/scumm/dialogs.cpp 2010-03-11 23:41:28 UTC (rev 48241)
@@ -674,7 +674,7 @@
}
void ValueDisplayDialog::handleTickle() {
- if (getMillis() > _timer) {
+ if (g_system->getMillis() > _timer) {
close();
}
}
@@ -702,7 +702,7 @@
_value--;
setResult(_value);
- _timer = getMillis() + kDisplayDelay;
+ _timer = g_system->getMillis() + kDisplayDelay;
draw();
} else {
close();
@@ -712,7 +712,7 @@
void ValueDisplayDialog::open() {
GUI_Dialog::open();
setResult(_value);
- _timer = getMillis() + kDisplayDelay;
+ _timer = g_system->getMillis() + kDisplayDelay;
}
SubtitleSettingsDialog::SubtitleSettingsDialog(ScummEngine *scumm, int value)
@@ -722,7 +722,7 @@
void SubtitleSettingsDialog::handleTickle() {
InfoDialog::handleTickle();
- if (getMillis() > _timer)
+ if (g_system->getMillis() > _timer)
close();
}
@@ -759,7 +759,7 @@
else
setInfoText(subtitleDesc[_value]);
- _timer = getMillis() + 1500;
+ _timer = g_system->getMillis() + 1500;
}
Indy3IQPointsDialog::Indy3IQPointsDialog(ScummEngine *scumm, char* text)
Modified: scummvm/trunk/gui/ListWidget.cpp
===================================================================
--- scummvm/trunk/gui/ListWidget.cpp 2010-03-11 23:40:40 UTC (rev 48240)
+++ scummvm/trunk/gui/ListWidget.cpp 2010-03-11 23:41:28 UTC (rev 48241)
@@ -290,7 +290,7 @@
// Quick selection mode: Go to first list item starting with this key
// (or a substring accumulated from the last couple key presses).
// Only works in a useful fashion if the list entries are sorted.
- uint32 time = getMillis();
+ uint32 time = g_system->getMillis();
if (_quickSelectTime < time) {
_quickSelectStr = (char)state.ascii;
} else {
Modified: scummvm/trunk/gui/PopUpWidget.cpp
===================================================================
--- scummvm/trunk/gui/PopUpWidget.cpp 2010-03-11 23:40:40 UTC (rev 48240)
+++ scummvm/trunk/gui/PopUpWidget.cpp 2010-03-11 23:41:28 UTC (rev 48241)
@@ -170,7 +170,7 @@
if (_openTime == 0) {
// Time the popup was opened
- _openTime = getMillis();
+ _openTime = g_system->getMillis();
}
}
@@ -178,7 +178,7 @@
// Mouse was released. If it wasn't moved much since the original mouse down,
// let the popup stay open. If it did move, assume the user made his selection.
int dist = (_clickX - x) * (_clickX - x) + (_clickY - y) * (_clickY - y);
- if (dist > 3 * 3 || getMillis() - _openTime > 300) {
+ if (dist > 3 * 3 || g_system->getMillis() - _openTime > 300) {
setResult(_selection);
close();
}
Modified: scummvm/trunk/gui/about.cpp
===================================================================
--- scummvm/trunk/gui/about.cpp 2010-03-11 23:40:40 UTC (rev 48240)
+++ scummvm/trunk/gui/about.cpp 2010-03-11 23:41:28 UTC (rev 48241)
@@ -175,7 +175,7 @@
void AboutDialog::open() {
- _scrollTime = getMillis() + kScrollStartDelay;
+ _scrollTime = g_system->getMillis() + kScrollStartDelay;
_scrollPos = 0;
_willClose = false;
@@ -253,7 +253,7 @@
}
void AboutDialog::handleTickle() {
- const uint32 t = getMillis();
+ const uint32 t = g_system->getMillis();
int scrollOffset = ((int)t - (int)_scrollTime) / kScrollMillisPerPixel;
if (scrollOffset > 0) {
int modifiers = g_system->getEventManager()->getModifierState();
Modified: scummvm/trunk/gui/editable.cpp
===================================================================
--- scummvm/trunk/gui/editable.cpp 2010-03-11 23:40:40 UTC (rev 48240)
+++ scummvm/trunk/gui/editable.cpp 2010-03-11 23:41:28 UTC (rev 48241)
@@ -77,7 +77,7 @@
}
void EditableWidget::handleTickle() {
- uint32 time = getMillis();
+ uint32 time = g_system->getMillis();
if (_caretTime < time) {
_caretTime = time + kCaretBlinkTime;
drawCaret(_caretVisible);
@@ -287,7 +287,7 @@
}
void EditableWidget::makeCaretVisible() {
- _caretTime = getMillis() + kCaretBlinkTime;
+ _caretTime = g_system->getMillis() + kCaretBlinkTime;
_caretVisible = true;
drawCaret(false);
}
Modified: scummvm/trunk/gui/message.cpp
===================================================================
--- scummvm/trunk/gui/message.cpp 2010-03-11 23:40:40 UTC (rev 48240)
+++ scummvm/trunk/gui/message.cpp 2010-03-11 23:41:28 UTC (rev 48241)
@@ -110,12 +110,12 @@
TimedMessageDialog::TimedMessageDialog(const Common::String &message, uint32 duration)
: MessageDialog(message, 0, 0) {
- _timer = getMillis() + duration;
+ _timer = g_system->getMillis() + duration;
}
void TimedMessageDialog::handleTickle() {
MessageDialog::handleTickle();
- if (getMillis() > _timer)
+ if (g_system->getMillis() > _timer)
close();
}
Modified: scummvm/trunk/gui/object.cpp
===================================================================
--- scummvm/trunk/gui/object.cpp 2010-03-11 23:40:40 UTC (rev 48240)
+++ scummvm/trunk/gui/object.cpp 2010-03-11 23:41:28 UTC (rev 48241)
@@ -40,10 +40,6 @@
_firstWidget = 0;
}
-uint32 GuiObject::getMillis() {
- return g_system->getMillis();
-}
-
void GuiObject::reflowLayout() {
if (!_name.empty()) {
if (!g_gui.xmlEval()->getWidgetData(_name, _x, _y, _w, _h)) {
Modified: scummvm/trunk/gui/object.h
===================================================================
--- scummvm/trunk/gui/object.h 2010-03-11 23:40:40 UTC (rev 48240)
+++ scummvm/trunk/gui/object.h 2010-03-11 23:41:28 UTC (rev 48241)
@@ -86,10 +86,6 @@
protected:
virtual void releaseFocus() = 0;
-
- // Convenience alias for OSystem::getMillis().
- // This is a bit hackish, of course :-).
- uint32 getMillis();
};
} // End of namespace GUI
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list