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

@@ -20,33 +20,6 @@ namespace fs = boost::filesystem;
#define NUM_TER_SHEETS 7
#define NUM_MONST_SHEETS 11
enum cursor_type {
wand_curs = 0,
eyedropper_curs = 1,
brush_curs = 2,
spray_curs = 3,
eraser_curs = 4,
topleft_curs = 5,
bottomright_curs = 6,
hand_curs = 7,
NW_curs = 8,
N_curs = 9,
NE_curs = 10,
W_curs = 11,
wait_curs = 12,
E_curs = 13,
SW_curs = 14,
S_curs = 15,
SE_curs = 16,
sword_curs = 17,
boot_curs = 18,
drop_curs = 19,
target_curs = 20,
talk_curs = 21,
key_curs = 22,
look_curs = 23,
};
struct m_pic_index_t {
unsigned char i, x, y;
};
@@ -102,8 +75,6 @@ struct cCustomGraphics {
};
void init_graph_tool();
void set_cursor(cursor_type which_curs);
void restore_cursor();
void rect_draw_some_item(sf::RenderTarget& targ_gworld,RECT targ_rect);
void rect_draw_some_item(const sf::Texture& src_gworld,RECT src_rect,sf::RenderTarget& targ_gworld,RECT targ_rect,sf::BlendMode mode = sf::BlendNone);
void rect_draw_some_item(const sf::Texture& src_gworld,RECT src_rect,RECT targ_rect,location offset,sf::BlendMode mode = sf::BlendNone);
@@ -130,8 +101,6 @@ void clip_region(sf::RenderWindow& where, Region& region);
void undo_clip(sf::RenderTarget& where);
#ifndef GRAPHTOOL_CPP
extern cursor_type arrow_curs[3][3];
extern cursor_type current_cursor;
extern m_pic_index_t m_pic_index[200];
extern RECT bg[];
#endif