{
case GD_TYPE_NORMAL_BUTTON:
case GD_TYPE_CHECK_BUTTON:
+ case GD_TYPE_CHECK_BUTTON_2:
case GD_TYPE_RADIO_BUTTON:
BlitBitmapOnBackground(gd->bitmap, drawto,
{
case GD_TYPE_NORMAL_BUTTON:
case GD_TYPE_CHECK_BUTTON:
+ case GD_TYPE_CHECK_BUTTON_2:
case GD_TYPE_RADIO_BUTTON:
SDL_SetTextureAlphaMod(gd->bitmap->texture_masked, alpha);
SDL_SetTextureBlendMode(gd->bitmap->texture_masked, SDL_BLENDMODE_BLEND);
boolean deactivate_gadget = TRUE;
boolean gadget_changed = TRUE;
- if (gi->type & GD_TYPE_SELECTBOX)
+ if (gi->type == GD_TYPE_CHECK_BUTTON_2)
+ {
+ gi->checked = !gi->checked;
+ }
+ else if (gi->type & GD_TYPE_SELECTBOX)
{
if (keep_selectbox_open ||
mouse_released_where_pressed ||
#define GD_TYPE_NORMAL_BUTTON (1 << 0)
#define GD_TYPE_TEXT_BUTTON (1 << 1)
#define GD_TYPE_CHECK_BUTTON (1 << 2)
-#define GD_TYPE_RADIO_BUTTON (1 << 3)
-#define GD_TYPE_DRAWING_AREA (1 << 4)
-#define GD_TYPE_TEXT_INPUT_ALPHANUMERIC (1 << 5)
-#define GD_TYPE_TEXT_INPUT_NUMERIC (1 << 6)
-#define GD_TYPE_TEXT_AREA (1 << 7)
-#define GD_TYPE_SELECTBOX (1 << 8)
-#define GD_TYPE_SCROLLBAR_VERTICAL (1 << 9)
-#define GD_TYPE_SCROLLBAR_HORIZONTAL (1 << 10)
+#define GD_TYPE_CHECK_BUTTON_2 (1 << 3)
+#define GD_TYPE_RADIO_BUTTON (1 << 4)
+#define GD_TYPE_DRAWING_AREA (1 << 5)
+#define GD_TYPE_TEXT_INPUT_ALPHANUMERIC (1 << 6)
+#define GD_TYPE_TEXT_INPUT_NUMERIC (1 << 7)
+#define GD_TYPE_TEXT_AREA (1 << 8)
+#define GD_TYPE_SELECTBOX (1 << 9)
+#define GD_TYPE_SCROLLBAR_VERTICAL (1 << 10)
+#define GD_TYPE_SCROLLBAR_HORIZONTAL (1 << 11)
#define GD_TYPE_BUTTON (GD_TYPE_NORMAL_BUTTON | \
GD_TYPE_TEXT_BUTTON | \
GD_TYPE_CHECK_BUTTON | \
+ GD_TYPE_CHECK_BUTTON_2 | \
GD_TYPE_RADIO_BUTTON)
#define GD_TYPE_SCROLLBAR (GD_TYPE_SCROLLBAR_VERTICAL | \
GD_TYPE_SCROLLBAR_HORIZONTAL)