/* win32joystick.rc: Joystick emulation
   Copyright (c) 2008 Marek Januszewski
   Copyright (c) 2015 UB880D

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License along
   with this program; if not, write to the Free Software Foundation, Inc.,
   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

   Author contact information:

   E-mail: philip-fuse@shadowmagic.org.uk

   Darren: linux@youmustbejoking.demon.co.uk

*/

#include "win32joystick.h"

IDD_JOYSTICKS DIALOGEX 0,0,420,149
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_FIXEDSYS | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Fuse - Configure Joystick"
FONT 8,"Ms Shell Dlg 2",400,0,1
BEGIN
    GROUPBOX        "Joystick type",IDC_JOYSTICKS_GROUP_JOYTYPE,0,0,60,125

/* those radio buttons will be created at runtime,
   with the sizes and distances like below

    RADIOBUTTON     "None",IDC_JOYSTICKS_RADIO_NONE,5,10,45,10
    RADIOBUTTON     "Cursor",IDC_JOYSTICKS_RADIO_CURSOR,5,20,45,10
    RADIOBUTTON     "Kempston",IDC_JOYSTICKS_RADIO_KEMPSTON,5,30,45,10
    RADIOBUTTON     "Sinclair 1",IDC_JOYSTICKS_RADIO_SINCLAIR1,5,40,45,10
    RADIOBUTTON     "Sinclair 2",IDC_JOYSTICKS_RADIO_SINCLAIR2,5,50,45,10
    RADIOBUTTON     "Timex 1",IDC_JOYSTICKS_RADIO_TIMEX1,5,60,45,10
    RADIOBUTTON     "Timex 2",IDC_JOYSTICKS_RADIO_TIMEX2,5,70,45,10
    RADIOBUTTON     "Fuller",IDC_JOYSTICKS_RADIO_FULLER,5,80,45,10
*/
    GROUPBOX        "Button 1",IDC_JOYSTICKS_GROUP_BUTTON1,65,0,115,25
    LTEXT           "Joystick Fire",IDC_JOYSTICKS_STATIC_BUTTON1,70,10,40,12,SS_CENTERIMAGE
    PUSHBUTTON      "",IDC_JOYSTICKS_BUTTON_BUTTON1,115,10,60,12

    GROUPBOX        "Button 2",IDC_JOYSTICKS_GROUP_BUTTON2,65,25,115,25
    LTEXT           "Joystick Fire",IDC_JOYSTICKS_STATIC_BUTTON2,70,35,40,12,SS_CENTERIMAGE
    PUSHBUTTON      "",IDC_JOYSTICKS_BUTTON_BUTTON2,115,35,60,12

    GROUPBOX        "Button 3",IDC_JOYSTICKS_GROUP_BUTTON3,65,50,115,25
    LTEXT           "Joystick Fire",IDC_JOYSTICKS_STATIC_BUTTON3,70,60,40,12,SS_CENTERIMAGE
    PUSHBUTTON      "",IDC_JOYSTICKS_BUTTON_BUTTON3,115,60,60,12

    GROUPBOX        "Button 4",IDC_JOYSTICKS_GROUP_BUTTON4,65,75,115,25
    LTEXT           "Joystick Fire",IDC_JOYSTICKS_STATIC_BUTTON4,70,85,40,12,SS_CENTERIMAGE
    PUSHBUTTON      "",IDC_JOYSTICKS_BUTTON_BUTTON4,115,85,60,12

    GROUPBOX        "Button 5",IDC_JOYSTICKS_GROUP_BUTTON5,65,100,115,25
    LTEXT           "Joystick Fire",IDC_JOYSTICKS_STATIC_BUTTON5,70,110,40,12,SS_CENTERIMAGE
    PUSHBUTTON      "",IDC_JOYSTICKS_BUTTON_BUTTON5,115,110,60,12

    GROUPBOX        "Button 6",IDC_JOYSTICKS_GROUP_BUTTON6,185,0,115,25
    LTEXT           "Joystick Fire",IDC_JOYSTICKS_STATIC_BUTTON6,190,10,40,12,SS_CENTERIMAGE
    PUSHBUTTON      "",IDC_JOYSTICKS_BUTTON_BUTTON6,235,10,60,12

    GROUPBOX        "Button 7",IDC_JOYSTICKS_GROUP_BUTTON7,185,25,115,25
    LTEXT           "Joystick Fire",IDC_JOYSTICKS_STATIC_BUTTON7,190,35,40,12,SS_CENTERIMAGE
    PUSHBUTTON      "",IDC_JOYSTICKS_BUTTON_BUTTON7,235,35,60,12

    GROUPBOX        "Button 8",IDC_JOYSTICKS_GROUP_BUTTON8,185,50,115,25
    LTEXT           "Joystick Fire",IDC_JOYSTICKS_STATIC_BUTTON8,190,60,40,12,SS_CENTERIMAGE
    PUSHBUTTON      "",IDC_JOYSTICKS_BUTTON_BUTTON8,235,60,60,12

    GROUPBOX        "Button 9",IDC_JOYSTICKS_GROUP_BUTTON9,185,75,115,25
    LTEXT           "Joystick Fire",IDC_JOYSTICKS_STATIC_BUTTON9,190,85,40,12,SS_CENTERIMAGE
    PUSHBUTTON      "",IDC_JOYSTICKS_BUTTON_BUTTON9,235,85,60,12

    GROUPBOX        "Button 10",IDC_JOYSTICKS_GROUP_BUTTON10,185,100,115,25
    LTEXT           "Joystick Fire",IDC_JOYSTICKS_STATIC_BUTTON10,190,110,40,12,SS_CENTERIMAGE
    PUSHBUTTON      "",IDC_JOYSTICKS_BUTTON_BUTTON10,235,110,60,12

    GROUPBOX        "Button 11",IDC_JOYSTICKS_GROUP_BUTTON11,305,0,115,25
    LTEXT           "Joystick Fire",IDC_JOYSTICKS_STATIC_BUTTON11,310,10,40,12,SS_CENTERIMAGE
    PUSHBUTTON      "",IDC_JOYSTICKS_BUTTON_BUTTON11,355,10,60,12

    GROUPBOX        "Button 12",IDC_JOYSTICKS_GROUP_BUTTON12,305,25,115,25
    LTEXT           "Joystick Fire",IDC_JOYSTICKS_STATIC_BUTTON12,310,35,40,12,SS_CENTERIMAGE
    PUSHBUTTON      "",IDC_JOYSTICKS_BUTTON_BUTTON12,355,35,60,12

    GROUPBOX        "Button 13",IDC_JOYSTICKS_GROUP_BUTTON13,305,50,115,25
    LTEXT           "Joystick Fire",IDC_JOYSTICKS_STATIC_BUTTON13,310,60,40,12,SS_CENTERIMAGE
    PUSHBUTTON      "",IDC_JOYSTICKS_BUTTON_BUTTON13,355,60,60,12

    GROUPBOX        "Button 14",IDC_JOYSTICKS_GROUP_BUTTON14,305,75,115,25
    LTEXT           "Joystick Fire",IDC_JOYSTICKS_STATIC_BUTTON14,310,85,40,12,SS_CENTERIMAGE
    PUSHBUTTON      "",IDC_JOYSTICKS_BUTTON_BUTTON14,355,85,60,12

    GROUPBOX        "Button 15",IDC_JOYSTICKS_GROUP_BUTTON15,305,100,115,25
    LTEXT           "Joystick Fire",IDC_JOYSTICKS_STATIC_BUTTON15,310,110,40,12,SS_CENTERIMAGE
    PUSHBUTTON      "",IDC_JOYSTICKS_BUTTON_BUTTON15,355,110,60,12

    DEFPUSHBUTTON   "OK",IDOK,155,130,50,14
    PUSHBUTTON      "Cancel",IDCANCEL,215,130,50,14
END

/* FIXME: resource should use KEYBOARD codes from keyboard.h */

#define KEYBOARD_NONE 0x00

#define KEYBOARD_space 0x20

#define KEYBOARD_0 0x30
#define KEYBOARD_1 0x31
#define KEYBOARD_2 0x32
#define KEYBOARD_3 0x33
#define KEYBOARD_4 0x34
#define KEYBOARD_5 0x35
#define KEYBOARD_6 0x36
#define KEYBOARD_7 0x37
#define KEYBOARD_8 0x38
#define KEYBOARD_9 0x39

#define KEYBOARD_a 0x61
#define KEYBOARD_b 0x62
#define KEYBOARD_c 0x63
#define KEYBOARD_d 0x64
#define KEYBOARD_e 0x65
#define KEYBOARD_f 0x66
#define KEYBOARD_g 0x67
#define KEYBOARD_h 0x68
#define KEYBOARD_i 0x69
#define KEYBOARD_j 0x6A
#define KEYBOARD_k 0x6B
#define KEYBOARD_l 0x6C
#define KEYBOARD_m 0x6D
#define KEYBOARD_n 0x6E
#define KEYBOARD_o 0x6F
#define KEYBOARD_p 0x70
#define KEYBOARD_q 0x71
#define KEYBOARD_r 0x72
#define KEYBOARD_s 0x73
#define KEYBOARD_t 0x74
#define KEYBOARD_u 0x75
#define KEYBOARD_v 0x76
#define KEYBOARD_w 0x77
#define KEYBOARD_x 0x78
#define KEYBOARD_y 0x79
#define KEYBOARD_z 0x7A

#define KEYBOARD_Enter  0x100
#define KEYBOARD_Caps   0x101
#define KEYBOARD_Symbol 0x102

#define KEYBOARD_JOYSTICK_FIRE 0x1000

IDR_JOYSTICKS_POPUP MENU
BEGIN
  POPUP ""
  BEGIN
    MENUITEM "Joystick Fire", KEYBOARD_JOYSTICK_FIRE

    POPUP "Numbers"
    BEGIN
      MENUITEM "0", KEYBOARD_0
      MENUITEM "1", KEYBOARD_1
      MENUITEM "2", KEYBOARD_2
      MENUITEM "3", KEYBOARD_3
      MENUITEM "4", KEYBOARD_4
      MENUITEM "5", KEYBOARD_5
      MENUITEM "6", KEYBOARD_6
      MENUITEM "7", KEYBOARD_7
      MENUITEM "8", KEYBOARD_8
      MENUITEM "9", KEYBOARD_9
    END

    POPUP "A-M"
    BEGIN
      MENUITEM "A", KEYBOARD_a
      MENUITEM "B", KEYBOARD_b
      MENUITEM "C", KEYBOARD_c
      MENUITEM "D", KEYBOARD_d
      MENUITEM "E", KEYBOARD_e
      MENUITEM "F", KEYBOARD_f
      MENUITEM "G", KEYBOARD_g
      MENUITEM "H", KEYBOARD_h
      MENUITEM "I", KEYBOARD_i
      MENUITEM "J", KEYBOARD_j
      MENUITEM "K", KEYBOARD_k
      MENUITEM "L", KEYBOARD_l
      MENUITEM "M", KEYBOARD_m
    END

    POPUP "N-Z"
    BEGIN
      MENUITEM "N", KEYBOARD_n
      MENUITEM "O", KEYBOARD_o
      MENUITEM "P", KEYBOARD_p
      MENUITEM "Q", KEYBOARD_q
      MENUITEM "R", KEYBOARD_r
      MENUITEM "S", KEYBOARD_s
      MENUITEM "T", KEYBOARD_t
      MENUITEM "U", KEYBOARD_u
      MENUITEM "V", KEYBOARD_v
      MENUITEM "W", KEYBOARD_w
      MENUITEM "X", KEYBOARD_x
      MENUITEM "Y", KEYBOARD_y
      MENUITEM "Z", KEYBOARD_z
    END

    MENUITEM "Space", KEYBOARD_space
    MENUITEM "Enter", KEYBOARD_Enter
    MENUITEM "Caps Shift", KEYBOARD_Caps
    MENUITEM "Symbol Shift", KEYBOARD_Symbol

    MENUITEM "Nothing", 1
  END
END
