mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
add cursor-visible
This commit is contained in:
parent
9b478957b7
commit
9b5662b635
@ -389,7 +389,7 @@ ChanConfig::ChanConfig(GraphicsPipe* pipe, std::string cfg, Node *render,
|
|||||||
|
|
||||||
bool border = !chanconfig.GetBool("no-border", !W.getBorder());
|
bool border = !chanconfig.GetBool("no-border", !W.getBorder());
|
||||||
bool fullscreen = chanconfig.GetBool("fullscreen", false);
|
bool fullscreen = chanconfig.GetBool("fullscreen", false);
|
||||||
// bool cursor = chanconfig.GetBool("cursor-visible", W.getCursor());
|
bool use_cursor = chanconfig.GetBool("cursor-visible", W.getCursor());
|
||||||
int want_depth_bits = chanconfig.GetInt("want-depth-bits", 1);
|
int want_depth_bits = chanconfig.GetInt("want-depth-bits", 1);
|
||||||
int want_color_bits = chanconfig.GetInt("want-color-bits", 1);
|
int want_color_bits = chanconfig.GetInt("want-color-bits", 1);
|
||||||
|
|
||||||
@ -412,6 +412,7 @@ ChanConfig::ChanConfig(GraphicsPipe* pipe, std::string cfg, Node *render,
|
|||||||
props._fullscreen = fullscreen;
|
props._fullscreen = fullscreen;
|
||||||
props._want_depth_bits = want_depth_bits;
|
props._want_depth_bits = want_depth_bits;
|
||||||
props._want_color_bits = want_color_bits;
|
props._want_color_bits = want_color_bits;
|
||||||
|
props._bCursorIsVisible = use_cursor;
|
||||||
|
|
||||||
// stereo prep?
|
// stereo prep?
|
||||||
// DVR prep?
|
// DVR prep?
|
||||||
|
@ -43,6 +43,7 @@ INLINE GraphicsWindow::Properties::Properties(const Properties &InitProp) {
|
|||||||
_mask=InitProp._mask;
|
_mask=InitProp._mask;
|
||||||
_want_depth_bits=InitProp._want_depth_bits;
|
_want_depth_bits=InitProp._want_depth_bits;
|
||||||
_want_color_bits=InitProp._want_color_bits;
|
_want_color_bits=InitProp._want_color_bits;
|
||||||
|
_bCursorIsVisible=InitProp._bCursorIsVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -107,6 +108,18 @@ set_fullscreen(bool fullscreen) {
|
|||||||
_fullscreen = fullscreen;
|
_fullscreen = fullscreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: GraphicsWindow::Properties::set_cursor_visible
|
||||||
|
// Access: Published
|
||||||
|
// Description: Specifies if mouse cursor is visible
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
INLINE void GraphicsWindow::Properties::
|
||||||
|
set_cursor_visible(bool IsVisible) {
|
||||||
|
_bCursorIsVisible=IsVisible; // note: gsg should override to implement
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GraphicsWindow::Properties::set_mask
|
// Function: GraphicsWindow::Properties::set_mask
|
||||||
// Access: Published
|
// Access: Published
|
||||||
|
@ -93,6 +93,7 @@ PUBLISHED:
|
|||||||
string _title;
|
string _title;
|
||||||
bool _border;
|
bool _border;
|
||||||
bool _fullscreen;
|
bool _fullscreen;
|
||||||
|
bool _bCursorIsVisible;
|
||||||
uint _mask;
|
uint _mask;
|
||||||
int _want_depth_bits;
|
int _want_depth_bits;
|
||||||
int _want_color_bits;
|
int _want_color_bits;
|
||||||
@ -135,6 +136,10 @@ PUBLISHED:
|
|||||||
INLINE void set_sync(const bool);
|
INLINE void set_sync(const bool);
|
||||||
INLINE bool get_sync() const;
|
INLINE bool get_sync() const;
|
||||||
|
|
||||||
|
// since this requires gsg modification, dont worry about implementing it yet
|
||||||
|
// since init control is good enough
|
||||||
|
// virtual void set_cursor_visible(bool bIsVisible); // should be overridden by gsg to implement
|
||||||
|
|
||||||
// resize the window to the given size
|
// resize the window to the given size
|
||||||
virtual void resize(unsigned int xsize,unsigned int ysize);
|
virtual void resize(unsigned int xsize,unsigned int ysize);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user