#define TYPE_SWITCH_3_STATES (1 << 2)
#define TYPE_YES_NO (1 << 3)
#define TYPE_YES_NO_AUTO (1 << 4)
-#define TYPE_ECS_AGA (1 << 5)
-#define TYPE_KEY (1 << 6)
-#define TYPE_KEY_X11 (1 << 7)
-#define TYPE_INTEGER (1 << 8)
-#define TYPE_STRING (1 << 9)
-#define TYPE_PLAYER (1 << 10)
-#define TYPE_ELEMENT (1 << 11)
-#define TYPE_GRAPHIC (1 << 12)
+#define TYPE_YES_NO_ASK (1 << 5)
+#define TYPE_ECS_AGA (1 << 6)
+#define TYPE_KEY (1 << 7)
+#define TYPE_KEY_X11 (1 << 8)
+#define TYPE_INTEGER (1 << 9)
+#define TYPE_STRING (1 << 10)
+#define TYPE_PLAYER (1 << 11)
+#define TYPE_ELEMENT (1 << 12)
+#define TYPE_GRAPHIC (1 << 13)
// additional values for setup screen
-#define TYPE_ENTER_SCREEN (1 << 13)
-#define TYPE_LEAVE_SCREEN (1 << 14)
-#define TYPE_ENTER_MENU (1 << 15)
-#define TYPE_LEAVE_MENU (1 << 16)
-#define TYPE_ENTER_LIST (1 << 17)
-#define TYPE_LEAVE_LIST (1 << 18)
-#define TYPE_TEXT_INPUT (1 << 19)
-#define TYPE_EMPTY (1 << 20)
-#define TYPE_SKIPPABLE (1 << 21)
-#define TYPE_KEYTEXT (1 << 22)
-#define TYPE_HEADLINE (1 << 23)
-
-#define TYPE_GHOSTED (1 << 24)
-#define TYPE_QUERY (1 << 25)
+#define TYPE_ENTER_SCREEN (1 << 14)
+#define TYPE_LEAVE_SCREEN (1 << 15)
+#define TYPE_ENTER_MENU (1 << 16)
+#define TYPE_LEAVE_MENU (1 << 17)
+#define TYPE_ENTER_LIST (1 << 18)
+#define TYPE_LEAVE_LIST (1 << 19)
+#define TYPE_TEXT_INPUT (1 << 20)
+#define TYPE_EMPTY (1 << 21)
+#define TYPE_SKIPPABLE (1 << 22)
+#define TYPE_KEYTEXT (1 << 23)
+#define TYPE_HEADLINE (1 << 24)
+
+#define TYPE_GHOSTED (1 << 25)
+#define TYPE_QUERY (1 << 26)
// additional values for internal purposes
-#define TYPE_BITFIELD (1 << 26)
-#define TYPE_CONTENT (1 << 27)
-#define TYPE_ELEMENT_LIST (1 << 28)
-#define TYPE_CONTENT_LIST (1 << 29)
+#define TYPE_BITFIELD (1 << 27)
+#define TYPE_CONTENT (1 << 28)
+#define TYPE_ELEMENT_LIST (1 << 29)
+#define TYPE_CONTENT_LIST (1 << 30)
// derived values for setup file handling
#define TYPE_BOOLEAN_STYLE (TYPE_BOOLEAN | \
#define TYPE_VALUE (TYPE_BOOLEAN_STYLE | \
TYPE_SWITCH_3_STATES | \
TYPE_YES_NO_AUTO | \
+ TYPE_YES_NO_ASK | \
TYPE_KEY | \
TYPE_KEY_X11 | \
TYPE_INTEGER | \
if (type & (TYPE_SWITCH |
TYPE_YES_NO |
TYPE_YES_NO_AUTO |
+ TYPE_YES_NO_ASK |
TYPE_STRING |
TYPE_PLAYER |
TYPE_ECS_AGA |
if (menu_info[choice].type & menu_navigation_type ||
menu_info[choice].type & TYPE_BOOLEAN_STYLE ||
menu_info[choice].type & TYPE_YES_NO_AUTO ||
+ menu_info[choice].type & TYPE_YES_NO_ASK ||
menu_info[choice].type & TYPE_PLAYER)
button = MB_MENU_CHOICE;
}
else if (type & TYPE_YES_NO_AUTO)
return (*(int *)value == MODE_AUTO ? FONT_OPTION_ON :
*(int *)value == FALSE ? FONT_OPTION_OFF : FONT_OPTION_ON);
+ else if (type & TYPE_YES_NO_ASK)
+ return (*(int *)value == MODE_ASK ? FONT_OPTION_ON :
+ *(int *)value == FALSE ? FONT_OPTION_OFF : FONT_OPTION_ON);
else if (type & TYPE_PLAYER)
return FONT_VALUE_1;
else
(*(int *)si->value == TRUE ? MODE_AUTO :
*(int *)si->value == MODE_AUTO ? FALSE : TRUE));
}
+ else if (si->type & TYPE_YES_NO_ASK)
+ {
+ *(int *)si->value =
+ (dx == -1 ?
+ (*(int *)si->value == MODE_ASK ? TRUE :
+ *(int *)si->value == TRUE ? FALSE : MODE_ASK) :
+ (*(int *)si->value == TRUE ? MODE_ASK :
+ *(int *)si->value == MODE_ASK ? FALSE : TRUE));
+ }
else if (si->type & TYPE_KEY)
{
Key key;