[Scummvm-cvs-logs] CVS: scummvm/gui EditTextWidget.cpp,1.28,1.29 ListWidget.cpp,1.40,1.41 PopUpWidget.cpp,1.33,1.34 about.cpp,1.24,1.25 browser.cpp,1.25,1.26 console.cpp,1.55,1.56 dialog.cpp,1.47,1.48 message.cpp,1.22,1.23 newgui.cpp,1.100,1.101 newgui.h,1.53,1.54 object.h,1.6,1.7 options.cpp,1.66,1.67
Max Horn
fingolfin at users.sourceforge.net
Mon Jan 10 14:09:10 CET 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/common debugger.cpp,1.13,1.14 timer.cpp,1.31,1.32 timer.h,1.19,1.20
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sky/music mt32music.cpp,1.21,1.22 musicbase.cpp,1.22,1.23 musicbase.h,1.15,1.16
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4479/gui
Modified Files:
EditTextWidget.cpp ListWidget.cpp PopUpWidget.cpp about.cpp
browser.cpp console.cpp dialog.cpp message.cpp newgui.cpp
newgui.h object.h options.cpp
Log Message:
system.h was being included in tons of places, without any good reason; reduced this (total dependencies on system.h went down from 193 to 85 files)
Index: EditTextWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/EditTextWidget.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- EditTextWidget.cpp 1 Jan 2005 16:08:51 -0000 1.28
+++ EditTextWidget.cpp 10 Jan 2005 22:05:36 -0000 1.29
@@ -42,7 +42,7 @@
}
void EditTextWidget::handleTickle() {
- uint32 time = g_system->getMillis();
+ uint32 time = getMillis();
if (_caretTime < time) {
_caretTime = time + kCaretBlinkTime;
drawCaret(_caretVisible);
Index: ListWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/ListWidget.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- ListWidget.cpp 1 Jan 2005 16:09:06 -0000 1.40
+++ ListWidget.cpp 10 Jan 2005 22:05:37 -0000 1.41
@@ -110,7 +110,7 @@
}
void ListWidget::handleTickle() {
- uint32 time = g_system->getMillis();
+ uint32 time = getMillis();
if (_editMode && _caretTime < time) {
_caretTime = time + kCaretBlinkTime;
drawCaret(_caretVisible);
@@ -172,7 +172,7 @@
// Only works in a useful fashion if the list entries are sorted.
// TODO: Maybe this should be off by default, and instead we add a
// method "enableQuickSelect()" or so ?
- uint32 time = g_system->getMillis();
+ uint32 time = getMillis();
if (_quickSelectTime < time) {
_quickSelectStr = (char)ascii;
} else {
Index: PopUpWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/PopUpWidget.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- PopUpWidget.cpp 1 Jan 2005 16:09:06 -0000 1.33
+++ PopUpWidget.cpp 10 Jan 2005 22:05:37 -0000 1.34
@@ -19,9 +19,9 @@
*/
#include "stdafx.h"
-#include "gui/PopUpWidget.h"
#include "gui/dialog.h"
#include "gui/newgui.h"
+#include "gui/PopUpWidget.h"
#include "base/engine.h"
namespace GUI {
@@ -102,7 +102,7 @@
_clickY = clickY - _y;
// Time the popup was opened
- _openTime = g_system->getMillis();
+ _openTime = getMillis();
}
void PopUpDialog::drawDialog() {
@@ -125,7 +125,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 || g_system->getMillis() - _openTime > 300) {
+ if (dist > 3 * 3 || getMillis() - _openTime > 300) {
setResult(_selection);
close();
}
Index: about.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/about.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- about.cpp 6 Jan 2005 22:48:41 -0000 1.24
+++ about.cpp 10 Jan 2005 22:05:37 -0000 1.25
@@ -21,6 +21,7 @@
#include "stdafx.h"
#include "base/engine.h"
#include "base/version.h"
+#include "common/system.h"
#include "gui/about.h"
#include "gui/newgui.h"
#include "gui/widget.h"
@@ -114,7 +115,7 @@
}
void AboutDialog::open() {
- _scrollTime = g_system->getMillis() + kScrollStartDelay;
+ _scrollTime = getMillis() + kScrollStartDelay;
_scrollPos = 0;
_modifiers = 0;
_willClose = false;
@@ -193,7 +194,7 @@
void AboutDialog::handleTickle() {
- const uint32 t = g_system->getMillis();
+ const uint32 t = getMillis();
int scrollOffset = ((int)t - (int)_scrollTime) / kScrollMillisPerPixel;
if (scrollOffset > 0) {
// Scroll faster when shift is pressed
Index: browser.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/browser.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- browser.cpp 1 Jan 2005 16:09:06 -0000 1.25
+++ browser.cpp 10 Jan 2005 22:05:37 -0000 1.26
@@ -25,6 +25,8 @@
#include "backends/fs/fs.h"
+#include "common/system.h"
+
namespace GUI {
#ifdef MACOSX
Index: console.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/console.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- console.cpp 9 Jan 2005 15:40:33 -0000 1.55
+++ console.cpp 10 Jan 2005 22:05:37 -0000 1.56
@@ -25,6 +25,8 @@
#include "base/engine.h"
#include "base/version.h"
+#include "common/system.h"
+
#include "graphics/font.h"
namespace GUI {
Index: dialog.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/dialog.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- dialog.cpp 6 Jan 2005 19:09:34 -0000 1.47
+++ dialog.cpp 10 Jan 2005 22:05:38 -0000 1.48
@@ -21,9 +21,11 @@
#include <ctype.h>
#include "stdafx.h"
-#include "newgui.h"
-#include "dialog.h"
-#include "widget.h"
+#include "gui/newgui.h"
+#include "gui/dialog.h"
+#include "gui/widget.h"
+
+#include "common/system.h"
namespace GUI {
@@ -294,4 +296,9 @@
return new ButtonWidget(this, x, y, kButtonWidth, 16, label, cmd, hotkey);
}
+
+uint32 GuiObject::getMillis() {
+ return g_system->getMillis();
+}
+
} // End of namespace GUI
Index: message.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/message.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- message.cpp 1 Jan 2005 16:09:07 -0000 1.22
+++ message.cpp 10 Jan 2005 22:05:38 -0000 1.23
@@ -156,12 +156,12 @@
TimedMessageDialog::TimedMessageDialog(const Common::String &message, uint32 duration)
: MessageDialog(message, 0, 0) {
- _timer = g_system->getMillis() + duration;
+ _timer = getMillis() + duration;
}
void TimedMessageDialog::handleTickle() {
MessageDialog::handleTickle();
- if (g_system->getMillis() > _timer)
+ if (getMillis() > _timer)
close();
}
Index: newgui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/newgui.cpp,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -d -r1.100 -r1.101
--- newgui.cpp 9 Jan 2005 15:40:34 -0000 1.100
+++ newgui.cpp 10 Jan 2005 22:05:38 -0000 1.101
@@ -19,6 +19,7 @@
*/
#include "stdafx.h"
+#include "common/system.h"
#include "common/util.h"
#include "gui/newgui.h"
#include "gui/dialog.h"
Index: newgui.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/newgui.h,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- newgui.h 6 Jan 2005 22:48:42 -0000 1.53
+++ newgui.h 10 Jan 2005 22:05:38 -0000 1.54
@@ -25,9 +25,10 @@
#include "common/singleton.h"
#include "common/stack.h"
#include "common/str.h"
-#include "common/system.h" // For events
#include "graphics/fontman.h"
+class OSystem;
+
namespace GUI {
class Dialog;
Index: object.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/object.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- object.h 1 Jan 2005 16:09:07 -0000 1.6
+++ object.h 10 Jan 2005 22:05:38 -0000 1.7
@@ -75,6 +75,10 @@
protected:
virtual void releaseFocus() = 0;
+
+ // Convenience alias for OSystem::getMillis().
+ // This is a bit hackish, of course :-).
+ uint32 getMillis();
};
} // End of namespace GUI
Index: options.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/options.cpp,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- options.cpp 10 Jan 2005 20:53:16 -0000 1.66
+++ options.cpp 10 Jan 2005 22:05:39 -0000 1.67
@@ -30,6 +30,7 @@
#include "backends/fs/fs.h"
#include "common/config-manager.h"
#include "common/scaler.h"
+#include "common/system.h"
#include "sound/mididrv.h"
#include "sound/mixer.h"
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/common debugger.cpp,1.13,1.14 timer.cpp,1.31,1.32 timer.h,1.19,1.20
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sky/music mt32music.cpp,1.21,1.22 musicbase.cpp,1.22,1.23 musicbase.h,1.15,1.16
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list