Some more tweaks to cursor handling

- Fix cursor turning into a sword during universe shifts
- Hide cursor along with menubar during splash screen
- Add watch cursor, used during splash screen
- Properly restore cursor after a dialog
- Use sword cursor for dialogs
- Show ibeam cursor in dialog text fields
- Move everything cursor-related out of graphtool
This commit is contained in:
2014-04-21 13:47:52 -04:00
parent 84192cd52f
commit 446bb1550d
13 changed files with 118 additions and 89 deletions

View File

@@ -45,7 +45,7 @@ namespace ResMgr {
{"W", {3, 9}}, {"wait", {8, 8}}, {"E", {8, 3}},
{"SW", {3, 12}}, {"S", {7, 13}}, {"SE", {3, 12}},
{"sword", {1, 1}}, {"boot", {7, 3}}, {"drop", {0, 14}}, {"target", {8, 8}},
{"talk", {6, 7}}, {"key", {3, 2}}, {"look", {7, 6}}
{"talk", {6, 7}}, {"key", {3, 2}}, {"look", {7, 6}}, {"watch", {7,8}},
};
fs::path fpath = resPool<CursorRsrc>::rel2abs(fname + ".gif");
fs::path hotpath = resPool<CursorRsrc>::rel2abs(fname + ".hot");
@@ -57,9 +57,9 @@ namespace ResMgr {
} else {
auto entry = cursor_hs.find(fname);
if(entry == cursor_hs.end())
fprintf(stderr,"Cursor hotspot missing: %s",fname.c_str());
fprintf(stderr,"Cursor hotspot missing: %s\n",fname.c_str());
else {
fprintf(stderr,"Cursor hotspot missing (using fallback value): %s",fname.c_str());
fprintf(stderr,"Cursor hotspot missing (using fallback value): %s\n",fname.c_str());
location hs = entry->second;
x = hs.x; y = hs.y;
}