2c8aad12ba
Change fgcommand to take an optional property tree root element. This fixes the animation bindings to use the defined property tree root - to support multiplayer (or other) model that can bind to the correct part of the property tree. Requires a corresponding fix in sg to allow the command methods to take an optional root parameter. What this means is that when inside someone else's multiplayer model (e.g. backseat, or co-pilot), the multipalyer (AI) model will correctly modify properties inside the correct part of the property tree inside (/ai), rather than modifying the properties inside the same part of the tree as the non-ai model. This means that a properly setup model will operate within it's own space in the property tree; and permit more generic multiplayer code to be written. This is probably responsible for some of the pollution of the root property tree with MP aircraft properties.
65 lines
1.8 KiB
C++
65 lines
1.8 KiB
C++
// MouseCursor.hxx - abstract inteface for mouse cursor control
|
|
|
|
// Copyright (C) 2013 James Turner <zakalawe@mac.com>
|
|
//
|
|
// This program is free software; you can redistribute it and/or
|
|
// modify it under the terms of the GNU General Public License as
|
|
// published by the Free Software Foundation; either version 2 of the
|
|
// License, or (at your option) any later version.
|
|
//
|
|
// This program is distributed in the hope that it will be useful, but
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
// General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with this program; if not, write to the Free Software
|
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
//
|
|
|
|
|
|
#ifndef FG_GUI_MOUSE_CURSOR_HXX
|
|
#define FG_GUI_MOUSE_CURSOR_HXX 1
|
|
|
|
class SGPropertyNode;
|
|
|
|
class FGMouseCursor
|
|
{
|
|
public:
|
|
static FGMouseCursor* instance();
|
|
|
|
virtual void setAutoHideTimeMsec(unsigned int aMsec);
|
|
|
|
enum Cursor
|
|
{
|
|
CURSOR_ARROW,
|
|
CURSOR_HAND, ///< the browser 'link' cursor
|
|
CURSOR_CLOSED_HAND,
|
|
CURSOR_CROSSHAIR,
|
|
CURSOR_IBEAM, ///< for editing text
|
|
CURSOR_IN_OUT, ///< arrow pointing into / out of the screen
|
|
CURSOR_LEFT_RIGHT,
|
|
CURSOR_UP_DOWN,
|
|
CURSOR_SPIN_CW,
|
|
CURSOR_SPIN_CCW
|
|
};
|
|
|
|
virtual void setCursor(Cursor aCursor) = 0;
|
|
|
|
virtual void setCursorVisible(bool aVis) = 0;
|
|
|
|
virtual void hideCursorUntilMouseMove() = 0;
|
|
|
|
virtual void mouseMoved() = 0;
|
|
|
|
static Cursor cursorFromString(const char* str);
|
|
|
|
protected:
|
|
FGMouseCursor();
|
|
|
|
bool setCursorCommand(const SGPropertyNode* arg, SGPropertyNode*);
|
|
|
|
unsigned int mAutoHideTimeMsec;
|
|
};
|
|
|
|
#endif // FG_GUI_MOUSE_CURSOR_HXX
|