Changeset 42:719f590e4878 in xplra for src/plugin/src/xplra/MessageWindow.cc
- Timestamp:
- 02/14/13 19:09:26 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/plugin/src/xplra/MessageWindow.cc
r38 r42 73 73 74 74 MessageWindow::MessageWindow() : 75 showForced(false), 75 76 hideTime(0.0), 76 77 duration(0.0) … … 104 105 //------------------------------------------------------------------------------ 105 106 107 void MessageWindow::show() 108 { 109 showForced = true; 110 XPLMSetWindowIsVisible(windowID, 1); 111 } 112 113 //------------------------------------------------------------------------------ 114 115 void MessageWindow::hide() 116 { 117 showForced = false; 118 } 119 120 //------------------------------------------------------------------------------ 121 106 122 void MessageWindow::drawWindow() 107 123 { … … 115 131 } 116 132 117 if (now>=hideTime) { 133 if (now>=hideTime) hideTime = 0.0; 134 135 if (hideTime==0.0 && !showForced) { 118 136 XPLMSetWindowIsVisible(windowID, 0); 119 137 } else { 120 138 XPLMDrawTranslucentDarkBox(left, top, right, bottom); 121 XPLMDrawString(colour, left + 25, top - 15, 122 const_cast<char*>(displayedMessage.c_str()), 0, 123 xplmFont_Basic); 139 if (hideTime!=0.0) { 140 XPLMDrawString(colour, left + 25, top - 15, 141 const_cast<char*>(displayedMessage.c_str()), 0, 142 xplmFont_Basic); 143 } 124 144 } 125 145 }
Note:
See TracChangeset
for help on using the changeset viewer.