diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-09-12 06:15:16 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-09-12 06:15:16 +0400 |
commit | 0dea748e01dab697d2f8ac245bbd5e925cd732ce (patch) | |
tree | 4699d5a262f3ff2a78643fd35243f0225b9397b3 /source/blender | |
parent | 75841bc97f82836e7af5524b79220b984da3b4f8 (diff) |
save and load configuration actuator, (option in game actuator menu)
saves a marshal'd GameLogic.globalDict to the blendfile path with the blend extension replaced with bgeconf
Use this in YoFrankie to save keyboard layout and graphics quality settings.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesdna/DNA_actuator_types.h | 2 | ||||
-rw-r--r-- | source/blender/src/buttons_logic.c | 10 |
2 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index ca0ad06eac3..750bdf2cfff 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -445,6 +445,8 @@ typedef struct FreeCamera { #define ACT_GAME_START 1 #define ACT_GAME_RESTART 2 #define ACT_GAME_QUIT 3 +#define ACT_GAME_SAVECFG 4 +#define ACT_GAME_LOADCFG 5 /* visibilityact->flag */ /* Set means the object will become invisible */ diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 4f704ef5ab0..a87104c82de 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -2296,13 +2296,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh uiDefBut(block, TEX, 1, "File: ", xco+10, yco-44,width-20,19, &(gma->filename), 0, 63, 0, 0, "Load this file"); uiDefBut(block, TEX, 1, "Anim: ", xco+10, yco-64,width-20,19, &(gma->loadaniname), 0, 63, 0, 0, "Use this loadinganimation"); } -*/ else if (gma->type == ACT_GAME_RESTART) - { - ysize = 28; - glRects(xco, yco-ysize, xco+width, yco); - uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); - } - else if (gma->type == ACT_GAME_QUIT) +*/ else if (ELEM4(gma->type, ACT_GAME_RESTART, ACT_GAME_QUIT, ACT_GAME_SAVECFG, ACT_GAME_LOADCFG)) { ysize = 28; glRects(xco, yco-ysize, xco+width, yco); @@ -2310,7 +2304,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh } //str = "Scene %t|Load game%x0|Start loaded game%x1|Restart this game%x2|Quit this game %x3"; - str = "Scene %t|Start new game%x0|Restart this game%x2|Quit this game %x3"; + str = "Scene %t|Start new game%x0|Restart this game%x2|Quit this game %x3|Save GameLogic.globalDict %x4|Load GameLogic.globalDict %x5"; uiDefButS(block, MENU, B_REDR, str, xco+40, yco-24, (width-80), 19, &gma->type, 0.0, 0.0, 0, 0, ""); yco -= ysize; |