Paste Code
Paste Blends
Paste Images
Index: release/scripts/ui/properties_game.py
===================================================================
--- release/scripts/ui/properties_game.py (revision 34468)
+++ release/scripts/ui/properties_game.py (working copy)
@@ -217,7 +217,9 @@

gs = context.scene.game_settings

- layout.prop(gs, "show_fullscreen")
+ row = layout.row()
+ row.prop(gs, "show_fullscreen")
+ row.prop(gs, "show_mouse")

split = layout.split()

Index: source/gameengine/GamePlayer/ghost/GPG_Application.cpp
===================================================================
--- source/gameengine/GamePlayer/ghost/GPG_Application.cpp (revision 34468)
+++ source/gameengine/GamePlayer/ghost/GPG_Application.cpp (working copy)
@@ -546,7 +546,10 @@
if (!m_canvas)
return false;

- m_canvas->Init();
+ m_canvas->Init();
+ if (gm->flag & GAME_SHOW_MOUSE)
+ m_canvas->SetMouseState(RAS_ICanvas::MOUSE_NORMAL);
+
m_rendertools = new GPC_RenderTools();
if (!m_rendertools)
goto initFailed;
Index: source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
===================================================================
--- source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp (revision 34468)
+++ source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp (working copy)
@@ -176,11 +176,18 @@
bool nodepwarnings = (SYS_GetCommandLineInt(syshandle, "ignore_deprecation_warnings", 0) != 0);
#endif
bool novertexarrays = (SYS_GetCommandLineInt(syshandle, "novertexarrays", 0) != 0);
+ bool mouse_state = startscene->gm.flag & GAME_SHOW_MOUSE;
+
if(animation_record) usefixed= true; /* override since you's always want fixed time for sim recording */

// create the canvas, rasterizer and rendertools
RAS_ICanvas* canvas = new KX_BlenderCanvas(win, area_rect, ar);
- canvas->SetMouseState(RAS_ICanvas::MOUSE_INVISIBLE);
+
+ // default mouse state set on render panel
+ if (mouse_state)
+ canvas->SetMouseState(RAS_ICanvas::MOUSE_NORMAL);
+ else
+ canvas->SetMouseState(RAS_ICanvas::MOUSE_INVISIBLE);
RAS_IRenderTools* rendertools = new KX_BlenderRenderTools();
RAS_IRasterizer* rasterizer = NULL;

Index: source/blender/makesdna/DNA_scene_types.h
===================================================================
--- source/blender/makesdna/DNA_scene_types.h (revision 34468)
+++ source/blender/makesdna/DNA_scene_types.h (working copy)
@@ -492,6 +492,7 @@
#define GAME_GLSL_NO_EXTRA_TEX (1 << 11)
#define GAME_IGNORE_DEPRECATION_WARNINGS (1 << 12)
#define GAME_ENABLE_ANIMATION_RECORD (1 << 13)
+#define GAME_SHOW_MOUSE (1 << 14)

/* GameData.matmode */
#define GAME_MAT_TEXFACE 0
Index: source/blender/makesrna/intern/rna_scene.c
===================================================================
--- source/blender/makesrna/intern/rna_scene.c (revision 34468)
+++ source/blender/makesrna/intern/rna_scene.c (working copy)
@@ -1811,6 +1811,10 @@
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_PHYSICS);
RNA_def_property_ui_text(prop, "Show Physics Visualization", "Show a visualization of physics bounds and interactions");

+ prop= RNA_def_property(srna, "show_mouse", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_MOUSE);
+ RNA_def_property_ui_text(prop, "Show Mouse", "Start player with a visible mouse cursor");
+
prop= RNA_def_property(srna, "use_frame_rate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_ENABLE_ALL_FRAMES);
RNA_def_property_ui_text(prop, "Use Frame Rate", "Respect the frame rate rather than rendering as many frames as possible");
  1. Index: release/scripts/ui/properties_game.py
  2. ===================================================================
  3. --- release/scripts/ui/properties_game.py       (revision 34468)
  4. +++ release/scripts/ui/properties_game.py       (working copy)
  5. @@ -217,7 +217,9 @@
  6.  
  7.          gs = context.scene.game_settings
  8.  
  9. -        layout.prop(gs, "show_fullscreen")
  10. +        row = layout.row()
  11. +        row.prop(gs, "show_fullscreen")
  12. +        row.prop(gs, "show_mouse")
  13.  
  14.          split = layout.split()
  15.  
  16. Index: source/gameengine/GamePlayer/ghost/GPG_Application.cpp
  17. ===================================================================
  18. --- source/gameengine/GamePlayer/ghost/GPG_Application.cpp      (revision 34468)
  19. +++ source/gameengine/GamePlayer/ghost/GPG_Application.cpp      (working copy)
  20. @@ -546,7 +546,10 @@
  21.                 if (!m_canvas)
  22.                         return false;
  23.                                
  24. -               m_canvas->Init();                              
  25. +               m_canvas->Init();
  26. +               if (gm->flag & GAME_SHOW_MOUSE)
  27. +                       m_canvas->SetMouseState(RAS_ICanvas::MOUSE_NORMAL);                            
  28. +
  29.                 m_rendertools = new GPC_RenderTools();
  30.                 if (!m_rendertools)
  31.                         goto initFailed;
  32. Index: source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
  33. ===================================================================
  34. --- source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp   (revision 34468)
  35. +++ source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp   (working copy)
  36. @@ -176,11 +176,18 @@
  37.                 bool nodepwarnings = (SYS_GetCommandLineInt(syshandle, "ignore_deprecation_warnings", 0) != 0);
  38.  #endif
  39.                 bool novertexarrays = (SYS_GetCommandLineInt(syshandle, "novertexarrays", 0) != 0);
  40. +               bool mouse_state = startscene->gm.flag & GAME_SHOW_MOUSE;
  41. +
  42.                 if(animation_record) usefixed= true; /* override since you's always want fixed time for sim recording */
  43.  
  44.                 // create the canvas, rasterizer and rendertools
  45.                 RAS_ICanvas* canvas = new KX_BlenderCanvas(win, area_rect, ar);
  46. -               canvas->SetMouseState(RAS_ICanvas::MOUSE_INVISIBLE);
  47. +              
  48. +               // default mouse state set on render panel
  49. +               if (mouse_state)
  50. +                       canvas->SetMouseState(RAS_ICanvas::MOUSE_NORMAL);
  51. +               else
  52. +                       canvas->SetMouseState(RAS_ICanvas::MOUSE_INVISIBLE);
  53.                 RAS_IRenderTools* rendertools = new KX_BlenderRenderTools();
  54.                 RAS_IRasterizer* rasterizer = NULL;
  55.                
  56. Index: source/blender/makesdna/DNA_scene_types.h
  57. ===================================================================
  58. --- source/blender/makesdna/DNA_scene_types.h   (revision 34468)
  59. +++ source/blender/makesdna/DNA_scene_types.h   (working copy)
  60. @@ -492,6 +492,7 @@
  61.  #define GAME_GLSL_NO_EXTRA_TEX                         (1 << 11)
  62.  #define GAME_IGNORE_DEPRECATION_WARNINGS       (1 << 12)
  63.  #define GAME_ENABLE_ANIMATION_RECORD           (1 << 13)
  64. +#define GAME_SHOW_MOUSE                                                (1 << 14)
  65.  
  66.  /* GameData.matmode */
  67.  #define GAME_MAT_TEXFACE       0
  68. Index: source/blender/makesrna/intern/rna_scene.c
  69. ===================================================================
  70. --- source/blender/makesrna/intern/rna_scene.c  (revision 34468)
  71. +++ source/blender/makesrna/intern/rna_scene.c  (working copy)
  72. @@ -1811,6 +1811,10 @@
  73.         RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_PHYSICS);
  74.         RNA_def_property_ui_text(prop, "Show Physics Visualization", "Show a visualization of physics bounds and interactions");
  75.  
  76. +       prop= RNA_def_property(srna, "show_mouse", PROP_BOOLEAN, PROP_NONE);
  77. +       RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_MOUSE);
  78. +       RNA_def_property_ui_text(prop, "Show Mouse", "Start player with a visible mouse cursor");
  79. +
  80.         prop= RNA_def_property(srna, "use_frame_rate", PROP_BOOLEAN, PROP_NONE);
  81.         RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_ENABLE_ALL_FRAMES);
  82.         RNA_def_property_ui_text(prop, "Use Frame Rate", "Respect the frame rate rather than rendering as many frames as possible");
  83.  
go to heaven