status.cpp 426 B

123456789101112131415
  1. auto Emulator::updateMessage() -> void {
  2. if(chrono::millisecond() - state.message.timestamp >= 2000) {
  3. program.statusMessage.setText(state.message.text);
  4. }
  5. }
  6. auto Emulator::showMessage(const string& message) -> void {
  7. state.message.timestamp = chrono::millisecond();
  8. program.statusMessage.setText(message);
  9. }
  10. auto Emulator::setCaption(const string& caption) -> void {
  11. program.statusCaption.setText(caption);
  12. }