Ignore:
Timestamp:
02/16/13 09:24:42 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added a menu option to reset the message area

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/plugin/src/xplra/MessageWindow.cc

    r46 r47  
    8080    heightDataRef = XPLMFindDataRef("sim/graphics/view/window_height");
    8181
    82     int screenWidth = XPLMGetDatai(widthDataRef);
    83     int screenHeight = XPLMGetDatai(heightDataRef);
    84 
    85     // Util::debug("hu.varadiistvan.xplra.MessageWindow: screenWidth=%d, screenHeight=%d\n",
    86     //             screenWidth, screenHeight);
    87 
    88     left = 50; right = screenWidth - left;
    89     top = screenHeight * 9 / 10; bottom = top - 25;
     82    resetLocation();
    9083
    9184    windowID = XPLMCreateWindow(left, top, right, bottom, 0,
     
    116109{
    117110    showForced = false;
     111}
     112
     113//------------------------------------------------------------------------------
     114
     115void MessageWindow::reset()
     116{
     117    resetLocation();
     118    XPLMSetWindowGeometry(windowID, left, top, right, bottom);
    118119}
    119120
     
    196197//------------------------------------------------------------------------------
    197198
     199void MessageWindow::resetLocation()
     200{
     201    int screenWidth = XPLMGetDatai(widthDataRef);
     202    int screenHeight = XPLMGetDatai(heightDataRef);
     203
     204    // Util::debug("hu.varadiistvan.xplra.MessageWindow: screenWidth=%d, screenHeight=%d\n",
     205    //             screenWidth, screenHeight);
     206
     207    left = 50; right = screenWidth - left;
     208    top = screenHeight * 9 / 10; bottom = top - 25;
     209}
     210
     211//------------------------------------------------------------------------------
     212
    198213// Local Variables:
    199214// mode: C++
Note: See TracChangeset for help on using the changeset viewer.