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

Added basic support for showing a message

File:
1 edited

Legend:

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

    r36 r38  
    3131#include "ListenThread.h"
    3232
     33#include "MessageWindow.h"
     34
    3335#include <hu/varadiistvan/xplcommon/Util.h>
    3436#include <hu/varadiistvan/scpl/config.h>
     
    4951
    5052using xplra::ListenThread;
     53using xplra::MessageWindow;
    5154
    5255using hu::varadiistvan::xplcommon::Util;
    5356
    5457//------------------------------------------------------------------------------
     58
     59/**
     60 * The window to display messages from the clients.
     61 */
     62static MessageWindow* messageWindow = 0;
    5563
    5664/**
     
    8997    XPLMGetVersions(&xplaneVersion, &xplmVersion, &hostID);
    9098
    91     listenThread = new ListenThread(xplaneVersion, xplmVersion);
     99    messageWindow = new MessageWindow();
     100
     101    listenThread = new ListenThread(xplaneVersion, xplmVersion,
     102                                    *messageWindow);
    92103    listenThread->start();
    93104}
     
    108119    Util::debug("hu.varadiistvan.xplra.XPluginDisable called\n");
    109120    // XPLMUnregisterFlightLoopCallback(&callback, 0);
     121
    110122    if (listenThread!=0) {
    111123        listenThread->quit();
    112124        listenThread = 0;
    113125    }
     126
     127    delete messageWindow; messageWindow = 0;
    114128}
    115129
Note: See TracChangeset for help on using the changeset viewer.