first commit
This commit is contained in:
49
include/engine/ui/ui_cursor.h
Normal file
49
include/engine/ui/ui_cursor.h
Normal file
@ -0,0 +1,49 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#ifndef __NUI_CURSOR__
|
||||
#define __NUI_CURSOR__
|
||||
|
||||
|
||||
#include "ui/ui_item.h"
|
||||
#include "ui/widget.h"
|
||||
|
||||
|
||||
namespace GS {
|
||||
namespace S2D {
|
||||
|
||||
// Scene 2D cursor.
|
||||
struct Cursor
|
||||
{
|
||||
int id;
|
||||
|
||||
struct State
|
||||
{
|
||||
float x, y;
|
||||
bool down;
|
||||
|
||||
SharedPtr <Item> item;
|
||||
SharedPtr <Widget> widget;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
x = y = 0;
|
||||
down = false;
|
||||
}
|
||||
|
||||
State() { Reset(); }
|
||||
};
|
||||
|
||||
State current_state,
|
||||
previous_state,
|
||||
down_state;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif // __NUI_CURSOR__
|
||||
Reference in New Issue
Block a user