Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2011-01-23 20:25:27 +0300
committerDalai Felinto <dfelinto@gmail.com>2011-01-23 20:25:27 +0300
commitd58c31704b7984687f001ea617af4d3ff85fd591 (patch)
tree2ba49c71ba4ed270ac14d6f70a4c5edc6e0a9bcd /source/gameengine/BlenderRoutines
parentfc66b3f2efcb5b7579f06c1966900b2ecf3c1310 (diff)
BGE: option in the UI to start with the mouse cursor visible. Patch by Vitor Balbio, changes by me.
---------------------------------- While we are more and more moving towards enabling features in the Python API, it's also important to have Logic Bricks working with no scripts. This option allows you to start the game with the mouse cursor on (it's on Render Buttons). The defalt is still off (no do_version needed here).
Diffstat (limited to 'source/gameengine/BlenderRoutines')
-rw-r--r--source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index e5179e8926f..f6e29fe0dbb 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -176,11 +176,18 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
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;