Ticket #8664: timed-message.patch
File timed-message.patch, 1.6 KB (added by , 17 years ago) |
---|
-
gui/message.h
48 48 */ 49 49 class TimedMessageDialog : public MessageDialog { 50 50 public: 51 TimedMessageDialog(const Common::String &message, uint32 duration );51 TimedMessageDialog(const Common::String &message, uint32 duration, bool interruptable = false); 52 52 53 53 void handleTickle(); 54 void handleMouseDown(int x, int y, int button, int clickCount) { if (_interruptable) close(); } 55 void handleKeyDown(uint16 ascii, int keycode, int modifiers) { if (_interruptable) close(); } 54 56 55 57 protected: 56 58 uint32 _timer; 59 bool _interruptable; 57 60 }; 58 61 59 62 } // End of namespace GUI -
gui/message.cpp
112 112 } 113 113 } 114 114 115 TimedMessageDialog::TimedMessageDialog(const Common::String &message, uint32 duration )115 TimedMessageDialog::TimedMessageDialog(const Common::String &message, uint32 duration, bool interruptable) 116 116 : MessageDialog(message, 0, 0) { 117 117 _timer = getMillis() + duration; 118 _interruptable = interruptable; 118 119 } 119 120 120 121 void TimedMessageDialog::handleTickle() { -
engines/scumm/input.cpp
431 431 if (VAR_VOICE_MODE != 0xFF) 432 432 VAR(VAR_VOICE_MODE) = _voiceMode; 433 433 434 GUI::TimedMessageDialog dialog(buf, 1500 );434 GUI::TimedMessageDialog dialog(buf, 1500, true); 435 435 runDialog(dialog); 436 436 return; 437 437 }