[Freeciv-Dev] (PR#17637) Wait Cursor
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=17637 >
Hello,
Here's a patch implementing wait/busy cursor. The hourglass is shown
between turns when no actions are possible, and will hopefully provide
some more feedback about the game-state. There is also an improved
cursor graphic for the "edit add" mode in the editor. Both cursors are
from Bluecurve in Redhat artwork. There are many other occasions where
the game appears frozen/slow, and the wait cursor could be used, such as
when starting games, changing tileset, modifying CMA settings in the
city list etc.
Andreas
diff -ruN -Xfreeciv-svn/diff_ignore freeciv-svn/client/civclient.c
freeciv-changed/client/civclient.c
--- freeciv-svn/client/civclient.c 2006-03-11 04:49:34.000000000 +0100
+++ freeciv-changed/client/civclient.c 2006-06-04 22:10:19.000000000 +0200
@@ -481,6 +481,7 @@
game_init();
attribute_init();
agents_init();
+ hover_tile = NULL;
}
/**************************************************************************
diff -ruN -Xfreeciv-svn/diff_ignore freeciv-svn/client/control.c
freeciv-changed/client/control.c
--- freeciv-svn/client/control.c 2006-03-21 04:05:38.000000000 +0100
+++ freeciv-changed/client/control.c 2006-06-04 22:12:08.000000000 +0200
@@ -885,6 +885,16 @@
struct unit_list *active_units = get_units_in_focus();
enum cursor_type mouse_cursor_type = CURSOR_DEFAULT;
+ if (get_client_state() != CLIENT_GAME_RUNNING_STATE) {
+ update_mouse_cursor(CURSOR_DEFAULT);
+ return;
+ }
+
+ if (turn_done_sent || waiting_for_end_turn) {
+ update_mouse_cursor(CURSOR_WAIT);
+ return;
+ }
+
if (!ptile) {
if (hover_tile) {
/* hover_tile is the tile which is currently under the mouse cursor. */
diff -ruN -Xfreeciv-svn/diff_ignore freeciv-svn/client/mapctrl_common.c
freeciv-changed/client/mapctrl_common.c
--- freeciv-svn/client/mapctrl_common.c 2006-03-21 04:05:38.000000000 +0100
+++ freeciv-changed/client/mapctrl_common.c 2006-06-04 21:25:13.000000000
+0200
@@ -631,6 +631,7 @@
turn_done_state = new_state;
set_turn_done_button_state(turn_done_state);
+ handle_mouse_cursor(NULL);
if (turn_done_state) {
if (waiting_for_end_turn
diff -ruN -Xfreeciv-svn/diff_ignore freeciv-svn/client/tilespec.c
freeciv-changed/client/tilespec.c
--- freeciv-svn/client/tilespec.c 2006-06-01 18:00:53.000000000 +0200
+++ freeciv-changed/client/tilespec.c 2006-06-04 21:25:13.000000000 +0200
@@ -2019,7 +2019,7 @@
for (f = 0; f < NUM_CURSOR_FRAMES; f++) {
const char *names[CURSOR_LAST] =
{"goto", "patrol", "paradrop", "nuke", "select",
- "invalid", "attack", "edit_paint", "edit_add"};
+ "invalid", "attack", "edit_paint", "edit_add", "wait"};
struct small_sprite *ss;
assert(ARRAY_SIZE(names) == CURSOR_LAST);
diff -ruN -Xfreeciv-svn/diff_ignore freeciv-svn/client/tilespec.h
freeciv-changed/client/tilespec.h
--- freeciv-svn/client/tilespec.h 2006-03-21 04:05:38.000000000 +0100
+++ freeciv-changed/client/tilespec.h 2006-06-04 21:25:13.000000000 +0200
@@ -162,6 +162,7 @@
CURSOR_ATTACK,
CURSOR_EDIT_PAINT,
CURSOR_EDIT_ADD,
+ CURSOR_WAIT,
CURSOR_LAST,
CURSOR_DEFAULT,
};
diff -ruN -Xfreeciv-svn/diff_ignore freeciv-svn/data/misc/cursors.spec
freeciv-changed/data/misc/cursors.spec
--- freeciv-svn/data/misc/cursors.spec 2006-03-21 04:05:38.000000000 +0100
+++ freeciv-changed/data/misc/cursors.spec 2006-06-04 21:25:13.000000000
+0200
@@ -10,6 +10,8 @@
Andreas Røsdal <andrearo@xxxxxxxxxxxx>
edit_paint cursor take from GIMP
+
+ Hourglass and Add from Bluecurve theme in redhat-artwork
"
@@ -79,4 +81,10 @@
3, 8, "cursor.edit_add3", 16, 16
4, 8, "cursor.edit_add4", 16, 16
5, 8, "cursor.edit_add5", 16, 16
+ 0, 9, "cursor.wait0", 16, 16
+ 1, 9, "cursor.wait1", 16, 16
+ 2, 9, "cursor.wait2", 16, 16
+ 3, 9, "cursor.wait3", 16, 16
+ 4, 9, "cursor.wait4", 16, 16
+ 5, 9, "cursor.wait5", 16, 16
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#17637) Wait Cursor,
Andreas Røsdal <=
|
|