Commit graph

79 commits

Author SHA1 Message Date
Eric House
12932bf788 fix crash on 64-bit system 2013-12-30 06:46:57 -08:00
Eric House
a26dced506 drawing tray tiles can fail, e.g. when font info not yet available, so
only clear bits when successful. Fixes problem where tray didn't get
drawn until tiles were somehow invalidated.
2013-11-07 07:29:54 -08:00
Eric House
f0b554213b assert rect isn't too small to inset 2013-11-04 05:59:18 -08:00
Eric House
88b380503e add function, not compiled by default, to return bounding rect of all
non-empty tiles. As a test, add menu that uses it to grey out that
region.
2013-10-27 21:51:30 -07:00
Eric House
d50c808f96 Merge branch 'android_branch' into gtk_multigame
Conflicts:
	xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java
	xwords4/common/comms.c
	xwords4/linux/cursesmain.c
	xwords4/linux/cursesmain.h
	xwords4/linux/gtkmain.c
	xwords4/linux/gtkmain.h
	xwords4/linux/linuxmain.c
	xwords4/linux/main.h
	xwords4/linux/scripts/discon_ok2.sh
	xwords4/relay/xwrelay.cpp

(Note: The curses app crashes on exit with mempool assertions, but that's a problem before the merge.)
2013-07-09 07:18:00 -07:00
Eric House
d41c1a4ca8 add new param so pending text can be drawn differently when it's not
the player's turn.
2013-05-30 07:17:13 -07:00
Eric House
a6784464ff first set of networking changes testing per-device communication with
relay on behalf of a number of games.  Works as long as all the games
are open.
2013-01-16 06:46:33 -08:00
Eric House
a107365c88 change names of two types and variables of that type to make a common
pattern more sensible.  No code changes.
2013-01-15 19:04:20 -08:00
Eric House
4af30c534c snapshot. New game button works and game gets saved in DB. Next: display and open from DB. 2013-01-05 16:08:19 -08:00
Eric House
63487dc5d0 assert gdk setup going ok 2013-01-03 08:18:35 -08:00
Eric House
968340f665 Fix release-build warnings that new compiler flags. 2012-10-07 11:43:50 -07:00
Eric House
6ddd4a61c1 fix compile errors (mostly unused variables) found by gcc on latest
Ubuntu (12.04).
2012-09-25 07:28:02 -07:00
Eric House
9b0436d1ee Make rem string measure function return boolean to indicate rect will
be invisible rather than setting width and height to 0.  No real
change beyond simplifying/speeding platform code.
2012-07-15 09:30:27 -07:00
Eric House
f1c5ebeb31 don't hide REM tiles square when drops to 0 2012-07-09 21:43:35 -07:00
Eric House
2fc2a60842 create alternate scoreboard draw flow, disabled by compile-time flag,
that does layout and draw in a single pass and with more information
so platform has more responsibilty for dealing with space constraints
and can, I hope, do a better job.  There's no change until the flag is
turned on.  Works for GTK with flag on, but is stubbed out for ncurses.
2012-06-26 07:20:09 -07:00
Eric House
405cb23023 fix bug where current player's scoreboard would disappear if other
players' names were too long by giving all a the same proportion of
what they request and passing in the percent given in case draw
implementation wants to use it as a cue to truncate.
2012-06-15 06:26:40 -07:00
Andy2
52d02f04dd pass tile value into drawCell(). Java code doesn't use it yet, but I
want to play with drawing cells tray-tile-style when they're big
enough.
2011-12-02 18:58:52 -08:00
Andy2
3ec97d5c07 Turn "Turn done" into "Pass" when the pending score is 0. To do that
I had to pass the score into draw_trayBegin since
draw_drawPendingScore() isn't called until the first tile's placed.
Note: as long as I'm messinng with this menuitem it should be disabled
when it's not the player's turn.
2011-10-04 18:48:33 -07:00
Eric House
c01981bc8f Make miniwindow stuff compile-time optional. The goal's to use native
features where they look better or are easier to manage, e.g. Toasts
and dialogs on Android.
2011-08-29 20:36:01 -07:00
Andy2
3b7b4802a9 add ability to specify, track and use separate dictionaries for each
player.  Works for gtk client.  Compiles for Android but there's no UI
yet to specify more than one dict.  Management of dupicate dicts
without duplicating memory -- refcounting -- will be up to the
platforms.
2011-04-01 19:57:10 -07:00
Andy2
f6be6222a1 draw timer in player color 2011-04-01 07:22:40 -07:00
Andy2
15f40f01af fix to compile with new gdk that's on ubuntu 10.10. Need to fix the
APIs eventually.....
2011-02-18 22:28:32 -08:00
Andy2
c9fec737e5 changes, protected by a disabled compile-time flag, to use cairo-based
API for drawing instead of now-deprecated gdk ones.  Unfortunately
nothing actually draws and I'm putting the debugging off until I have
some time.
2011-01-14 18:15:33 -08:00
Andy2
e7dbac41a6 fix to compile with new gdk that's on ubuntu 10.10. Need to fix the
APIs eventually.....
2011-01-12 19:00:20 -08:00
Andy2
2d69d8f2b0 use new crosshairs flags to draw a cross in the middle third of cells 2010-08-11 18:51:09 -07:00
eehouse
92e02c9c2e catch up with API changes 2010-05-28 02:31:04 +00:00
eehouse
1950e38bda remove bogus assert and logging 2010-04-08 04:15:08 +00:00
eehouse
a87ecf5638 pass vScale and hScale into draw_boardBegin so platform can use same
size font for all cells regardless of size; fix scrolling to pass
actual sum of the disappearing rows' heights.
2010-04-08 04:14:55 +00:00
eehouse
00e8742ad8 show blank as a ? rather than a _. 2010-03-08 06:10:46 +00:00
eehouse
47402bd3b5 remove unused field 2010-02-27 18:05:00 +00:00
ehouse
b8e7cd411f fix to use new API. (this and prev checkin via terminal app on phone :-) 2009-11-19 02:26:38 +00:00
ehouse
1fa8b2e48f remove unused param (not even compiled on Palm); on wince, try to
duplicate for timer the vertical offset used for scores.
2009-10-16 03:20:39 +00:00
ehouse
f80b1d74f2 include name of player whose turn it is in scoreboard entry, reducing
length until it fits.  (Still needs polishing...)
2009-10-15 12:44:53 +00:00
ehouse
1da25307e5 Display relay state on board, horizontal scoreboard mode only for now. 2009-09-20 18:45:25 +00:00
ehouse
a5556469ef fix timer formatting 2009-09-20 05:00:23 +00:00
ehouse
d86d2b556a Tweak to support non-ascii utf-8 chars from dicts. Seems to display
Catalan and Polish fine (on board.)
2009-08-29 16:09:24 +00:00
ehouse
99a5a7912b Use new draw API but same bitmap as always (large in tile, small in
cell.)  In cases where bitmap and text provided, prefer bitmap.
2009-01-13 13:02:17 +00:00
ehouse
cefd69d8b3 Since there's now a flag indicating whether to show the value of a
tile, make value unsigned.  Adjust/fix platforms.  Add cmdline flag to
linux apps for hiding values.
2008-12-29 03:09:35 +00:00
ehouse
5118e415c7 use a gharish color for focus so doesn't get lost 2008-11-22 16:37:58 +00:00
ehouse
9b17c20117 gtk/ncurses support for Rem: focus and showing remaining tiles. Also
rewrite gtkask to use gtk_message_dialog and add sigint handler.
2008-10-24 09:07:30 +00:00
ehouse
36627fb051 Add listeners to model so board can be notified whenever dictionary
changes.  Pass dict into draw via new API, removing it from the
draw_begin calls.
2008-09-05 12:11:37 +00:00
ehouse
30fcb88e43 fix problems drawing focus so letters still visible on board. 2008-07-28 05:03:37 +00:00
ehouse
bc05761c4a change API for drawing divider so it can be focussed as well as
selected.  Being using that information in palm and wince.  For GTK,
use color rather than ugly black rects to indicate focus.
2008-07-17 05:03:01 +00:00
ehouse
bbfdeb6bf8 Draw tiles hanging a bit below board when hidden to allow testing of
common case on wince devices.
2008-06-07 23:03:47 +00:00
ehouse
4730a23188 fix gtk_draw_vertScrollBoard to scroll bits rather than just letting
board inval everything.
2008-04-12 16:50:46 +00:00
ehouse
ae67a58a26 Attempt to find font that best fits string to encosing rect. Works
but only with a hack: need to understand pango better.
2008-03-25 12:47:05 +00:00
ehouse
d3ce87b057 Indicate empty cell with CELL_ISEMPTY rather than an empty string; fix
palm to not draw star on top of placed tile.
2008-03-14 09:36:42 +00:00
ehouse
355cfa9fcc add owner param to drawTileMidDrag so can color tiles correctly 2008-03-11 11:48:53 +00:00
ehouse
f30dd17e00 rename constants to begin with GTK so they're unique. 2008-03-10 00:51:20 +00:00
ehouse
0b1f4b8f0a merge with drag_n_drop branch: apply patch generated with this command on that branch: svn diff -r 2080:2087 2008-03-08 23:16:21 +00:00