mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-01 06:19:57 +01:00
3153e2b867
scoreboard and tray on palm; make center drill into the focussed object and spacebar come back up then move the focus among them. Integrate with other focussable objects on main form. Go from separate drawCursor routines to same for all three, with cursor only visible when focus is drilled down. On curses, add a hilite rect routine that can be called after text is laid down, and use for cursors.
205 lines
6.1 KiB
C
205 lines
6.1 KiB
C
/* -*-mode: c; fill-column: 78; -*- */
|
|
|
|
/*****************************************************************************
|
|
* Copyright 1999 - 2001 by Eric House. All rights reserved.
|
|
*
|
|
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*
|
|
* These resources are shared among all localized verions of XW4; no
|
|
* localization required.
|
|
****************************************************************************/
|
|
|
|
#ifdef COLOR_SUPPORT
|
|
/* colors */
|
|
HEX "Clrs" ID 1000
|
|
0x00 0x00 0x00 /* black */
|
|
0xFF 0xFF 0xFF /* white */
|
|
0x00 0x00 0x00 /* player 1 */
|
|
0xFF 0x00 0x00
|
|
0x00 0x00 0xFF
|
|
0x00 0xFF 0x00
|
|
0xAF 0xAF 0x00 /* bonus 1 */
|
|
0x00 0xAF 0xAF
|
|
0xAF 0x00 0xAF
|
|
0xAF 0xAF 0xAF
|
|
0xFF 0xFF 0xFF /* empty cells */
|
|
0xFF 0xFF 0x99 /* tile background */
|
|
#endif
|
|
|
|
ICONFAMILY "./bmps/xwbandwicon.bmp" "" "" "./bmps/xwcoloricon.bmp" TRANSPARENT 255 255 255
|
|
SMALLICONFAMILY "bmps/xwbandwicon_sm.bmp" "" "" "./bmps/xwcoloricon_sm.bmp" TRANSPARENT 255 255 255
|
|
|
|
BITMAP ID SHOWTRAY_BUTTON_BMP_RES_ID "bmps/showtray.pbitm" AUTOCOMPRESS
|
|
|
|
BITMAP ID DOWN_ARROW_RESID AUTOCOMPRESS
|
|
BEGIN
|
|
BITMAP "bmps/downarrow.pbitm" BPP 1 DENSITY 72
|
|
BITMAP "bmps/downarrowhd.pbitm" BPP 1 DENSITY 144
|
|
END
|
|
|
|
BITMAP ID RIGHT_ARROW_RESID AUTOCOMPRESS
|
|
BEGIN
|
|
BITMAP "bmps/rightarrow.pbitm" BPP 1 DENSITY 72
|
|
BITMAP "bmps/rightarrowhd.pbitm" BPP 1 DENSITY 144
|
|
END
|
|
|
|
/* bitmap family for inclding highres version */
|
|
BITMAP ID TRAY_BUTTONS_BMP_RES_ID AUTOCOMPRESS
|
|
BEGIN
|
|
BITMAP "bmps/traybuttons.pbitm" BPP 1 DENSITY 72
|
|
BITMAP "bmps/traybuttonshd.pbitm" BPP 1 DENSITY 144
|
|
END
|
|
|
|
BITMAP ID STAR_BMP_RES_ID AUTOCOMPRESS
|
|
BEGIN
|
|
BITMAP "bmps/startmark.pbitm" BPP 1 DENSITY 72
|
|
BITMAP "bmps/startmarkhd.pbitm" BPP 1 DENSITY 144
|
|
END
|
|
|
|
BITMAP ID FLIP_BUTTON_BMP_RES_ID AUTOCOMPRESS
|
|
BEGIN
|
|
BITMAP "bmps/flipbutton.pbitm" BPP 1 DENSITY 72
|
|
BITMAP "bmps/flipbuttonhd.pbitm" BPP 1 DENSITY 144
|
|
END
|
|
|
|
BITMAP ID HINT_BUTTON_BMP_RES_ID AUTOCOMPRESS
|
|
BEGIN
|
|
BITMAP "bmps/lightbulb.pbitm" BPP 1 DENSITY 72
|
|
BITMAP "bmps/lightbulbhd.pbitm" BPP 1 DENSITY 144
|
|
END
|
|
|
|
BITMAP ID VALUE_BUTTON_BMP_RES_ID AUTOCOMPRESS
|
|
BEGIN
|
|
BITMAP "bmps/valuebutton.pbitm" BPP 1 DENSITY 72
|
|
BITMAP "bmps/valuebuttonhd.pbitm" BPP 1 DENSITY 144
|
|
END
|
|
|
|
#define TBH TRAY_BUTTON_HEIGHT_HR
|
|
#define TBY TRAY_BUTTONS_Y_HR
|
|
|
|
FORM ID XW_MAIN_FORM AT (0 0 160 160)
|
|
USABLE
|
|
NOFRAME
|
|
MENUID XW_MAIN_MENU_ID
|
|
BEGIN
|
|
#ifdef XWFEATURE_FIVEWAY
|
|
GADGET ID XW_SCOREBOARD_GADGET_ID AT (0 0 1 1) USABLE
|
|
GADGET ID XW_BOARD_GADGET_ID AT (0 0 1 1) USABLE
|
|
GADGET ID XW_TRAY_GADGET_ID AT (0 0 1 1) USABLE
|
|
#endif
|
|
BUTTON "" XW_MAIN_FLIP_BUTTON_ID
|
|
AT (PALM_FLIP_LEFT PALM_BOARD_TOP FLIP_BUTTON_WIDTH
|
|
FLIP_BUTTON_HEIGHT) NOFRAME
|
|
BUTTON "" XW_MAIN_VALUE_BUTTON_ID
|
|
AT (PALM_FLIP_LEFT PREVBOTTOM+2
|
|
FLIP_BUTTON_WIDTH FLIP_BUTTON_HEIGHT+2) NOFRAME
|
|
BUTTON "" XW_MAIN_HINT_BUTTON_ID
|
|
AT (PALM_FLIP_LEFT PREVBOTTOM+2 FLIP_BUTTON_WIDTH
|
|
FLIP_BUTTON_HEIGHT+3) NOFRAME
|
|
|
|
SCROLLBAR ID XW_MAIN_SCROLLBAR_ID
|
|
AT ( PREVLEFT PREVBOTTOM+5 RECOMMENDED_SBAR_WIDTH
|
|
160-TRAY_HEIGHT_HR-PREVBOTTOM-IR_STATUS_HEIGHT-5)
|
|
USABLE VALUE SBAR_START_VALUE MIN SBAR_MIN MAX SBAR_MIN
|
|
PAGESIZE SBAR_PAGESIZE
|
|
|
|
BUTTON "" XW_MAIN_SHOWTRAY_BUTTON_ID
|
|
AT (PALM_FLIP_LEFT SHOWTRAY_BUTTON_Y
|
|
FLIP_BUTTON_WIDTH FLIP_BUTTON_WIDTH+4) NOFRAME
|
|
|
|
#ifndef EIGHT_TILES
|
|
BUTTON "" XW_MAIN_HIDE_BUTTON_ID
|
|
AT(PALM_TRAY_BUTTON_LEFT TBY TRAY_BUTTON_WIDTH TBH) NOFRAME
|
|
BUTTON "" XW_MAIN_JUGGLE_BUTTON_ID
|
|
AT(PREVRIGHT PREVTOP TRAY_BUTTON_WIDTH TBH) NOFRAME
|
|
BUTTON "" XW_MAIN_TRADE_BUTTON_ID
|
|
AT(PALM_TRAY_BUTTON_LEFT PREVBOTTOM TRAY_BUTTON_WIDTH
|
|
TBH) NOFRAME
|
|
BUTTON "" XW_MAIN_DONE_BUTTON_ID
|
|
AT(PREVRIGHT PREVTOP TRAY_BUTTON_WIDTH TBH) NOFRAME
|
|
#endif
|
|
#ifdef FOR_GREMLINS
|
|
GADGET GREMLIN_BOARD_GADGET_IDAUTOID AT ( 0 5 152 135 )
|
|
GADGET GREMLIN_TRAY_GADGET_IDAUTOID AT ( 0 140 145 20 )
|
|
#endif
|
|
END /* XW_MAIN_FORM */
|
|
|
|
#ifdef XWFEATURE_FIVEWAY
|
|
NAVIGATION ID XW_MAIN_FORM
|
|
INITIALSTATE kFrmNavHeaderFlagsObjectFocusStartState
|
|
INITIALOBJECTID XW_MAIN_FLIP_BUTTON_ID
|
|
BEGIN
|
|
ID XW_SCOREBOARD_GADGET_ID
|
|
ID XW_BOARD_GADGET_ID
|
|
|
|
ID XW_MAIN_FLIP_BUTTON_ID
|
|
ID XW_MAIN_VALUE_BUTTON_ID
|
|
ID XW_MAIN_HINT_BUTTON_ID
|
|
|
|
ID XW_TRAY_GADGET_ID
|
|
|
|
ID XW_MAIN_SHOWTRAY_BUTTON_ID
|
|
ID XW_MAIN_HIDE_BUTTON_ID
|
|
ID XW_MAIN_JUGGLE_BUTTON_ID
|
|
ID XW_MAIN_TRADE_BUTTON_ID
|
|
ID XW_MAIN_DONE_BUTTON_ID
|
|
END
|
|
#endif
|
|
|
|
STRING ID 1000 "/palm/programs/Crosswords/"
|
|
|
|
APPLICATIONICONNAME ID 1000 ICONTEXT
|
|
|
|
/* force hotsync into games category */
|
|
LAUNCHERCATEGORY ID 1000 "Games"
|
|
|
|
HEX "Xbrd" ID 1000
|
|
#if 1 /* the "scrabble" pattern */
|
|
0x40 0x01 0x00 0x04
|
|
0x02 0x00 0x03 0x00
|
|
0x00 0x20 0x00 0x10
|
|
0x10 0x02 0x00 0x01
|
|
0x00 0x00 0x20 0x00
|
|
0x03 0x00 0x03 0x00
|
|
0x00 0x10 0x00 0x10
|
|
0x40 0x01 0x00 0x02
|
|
#else
|
|
0x04 0x00 0x10 0x04
|
|
0x40 0x00 0x03 0x00
|
|
0x00 0x00 0x20 0x10
|
|
0x00 0x03 0x00 0x01
|
|
0x10 0x20 0x00 0x30
|
|
0x03 0x00 0x01 0x00
|
|
0x00 0x10 0x30 0x00
|
|
0x40 0x01 0x00 0x02
|
|
#endif
|
|
|
|
/* for 13x13 board */
|
|
HEX "Xbrd" ID 1001 /* This is 7x7, so one line is two rows */
|
|
0x20 0x03 0x00 0x30 0x40 0x00 0x10
|
|
0x00 0x10 0x00 0x03 0x00 0x30 0x00
|
|
0x00 0x00 0x10 0x00 0x10 0x00 0x30
|
|
0x30 0x00 0x00 0x20
|
|
|
|
/* for 11x11 board */
|
|
HEX "Xbrd" ID 1002 /* This is 6x6 */
|
|
0x04 0x00 0x03
|
|
0x40 0x03 0x00
|
|
0x00 0x10 0x01
|
|
0x03 0x01 0x00
|
|
0x00 0x00 0x30
|
|
0x30 0x10 0x02
|
|
|
|
VERSION ID 1000 XW_PALM_VERSION_STRING
|