diff options
-rw-r--r-- | gui/onscreendialog.cpp | 26 | ||||
-rw-r--r-- | gui/onscreendialog.h | 10 |
2 files changed, 19 insertions, 17 deletions
diff --git a/gui/onscreendialog.cpp b/gui/onscreendialog.cpp index e508c64290..03a6f26ec0 100644 --- a/gui/onscreendialog.cpp +++ b/gui/onscreendialog.cpp @@ -112,13 +112,13 @@ OnScreenDialog::OnScreenDialog(bool isRecord) : Dialog("OnScreenDialog") { } - text = new GUI::StaticTextWidget(this, "OnScreenDialog.TimeLabel", "00:00:00"); + _text = new GUI::StaticTextWidget(this, "OnScreenDialog.TimeLabel", "00:00:00"); _enableDrag = false; _mouseOver = false; _editDlgShown = false; - lastTime = 0; - dlg = 0; + _lastTime = 0; + _dlg = 0; } void OnScreenDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { @@ -130,20 +130,20 @@ void OnScreenDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat close(); break; case kEditCmd: - dlg = new EditRecordDialog(g_eventRec.getAuthor(), g_eventRec.getName(), g_eventRec.getNotes()); + _dlg = new EditRecordDialog(g_eventRec.getAuthor(), g_eventRec.getName(), g_eventRec.getNotes()); CursorMan.lock(false); g_eventRec.setRedraw(false); g_system->showOverlay(); _editDlgShown = true; - dlg->runModal(); + _dlg->runModal(); _editDlgShown = false; g_system->hideOverlay(); g_eventRec.setRedraw(true); CursorMan.lock(true); - g_eventRec.setAuthor(((EditRecordDialog *)dlg)->getAuthor()); - g_eventRec.setName(((EditRecordDialog *)dlg)->getName()); - g_eventRec.setNotes(((EditRecordDialog *)dlg)->getNotes()); - delete dlg; + g_eventRec.setAuthor(((EditRecordDialog *)_dlg)->getAuthor()); + g_eventRec.setName(((EditRecordDialog *)_dlg)->getName()); + g_eventRec.setNotes(((EditRecordDialog *)_dlg)->getNotes()); + delete _dlg; break; case kSwitchModeCmd: if (g_eventRec.switchMode()) { @@ -157,10 +157,10 @@ void OnScreenDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat } void OnScreenDialog::setReplayedTime(uint32 newTime) { - if (newTime - lastTime > 1000) { + if (newTime - _lastTime > 1000) { uint32 seconds = newTime / 1000; - text->setLabel(Common::String::format("%.2d:%.2d:%.2d", seconds / 3600 % 24, seconds / 60 % 60, seconds % 60)); - lastTime = newTime; + _text->setLabel(Common::String::format("%.2d:%.2d:%.2d", seconds / 3600 % 24, seconds / 60 % 60, seconds % 60)); + _lastTime = newTime; } } @@ -220,7 +220,7 @@ void OnScreenDialog::close() { Dialog *OnScreenDialog::getActiveDlg() { if (_editDlgShown) { - return dlg; + return _dlg; } else { return this; } diff --git a/gui/onscreendialog.h b/gui/onscreendialog.h index 4f3839acb6..2fae14cbc6 100644 --- a/gui/onscreendialog.h +++ b/gui/onscreendialog.h @@ -30,14 +30,16 @@ namespace GUI { class OnScreenDialog : public Dialog { private: - uint32 lastTime; + uint32 _lastTime; bool _enableDrag; bool _mouseOver; bool _editDlgShown; Common::Point _dragPoint; - GUI::StaticTextWidget *text; - Dialog *dlg; + GUI::StaticTextWidget *_text; + Dialog *_dlg; + bool isMouseOver(int x, int y); + public: OnScreenDialog(bool recordingMode); ~OnScreenDialog(); @@ -56,7 +58,7 @@ public: bool isEditDlgVisible(); Dialog *getActiveDlg(); protected: - virtual void releaseFocus(); + virtual void releaseFocus(); }; } // End of namespace GUI |