Rename custom cursor class to avoid conflict with X11 type

This commit is contained in:
2017-01-30 15:05:38 -05:00
parent 73cfe2bd24
commit ac15358c46
4 changed files with 13 additions and 13 deletions

View File

@@ -47,7 +47,7 @@ static void GetMaskBitmaps(const sf::Image& srcImage, HBITMAP& hAndMaskBitmap, H
ReleaseDC(NULL, hDC);
}
Cursor::Cursor(fs::path imgPath, float hotSpotX, float hotSpotY) {
cCursor::cCursor(fs::path imgPath, float hotSpotX, float hotSpotY) {
sf::Image gif;
if(!gif.loadFromFile(imgPath.string())) {
std::string error = "Error loading cursor from " + imgPath.string();
@@ -76,12 +76,12 @@ Cursor::Cursor(fs::path imgPath, float hotSpotX, float hotSpotY) {
DeleteObject(cursorXor);
}
Cursor::~Cursor() {
cCursor::~cCursor() {
HCURSOR curs = (HCURSOR)ptr;
DestroyIcon(curs);
}
void Cursor::apply() {
void cCursor::apply() {
HCURSOR curs = (HCURSOR)ptr;
SetCursor(curs);
}
@@ -96,7 +96,7 @@ void set_cursor(cursor_type which_c) {
if(which_c == text_curs) {
SetCursor(LoadCursor(NULL, IDC_IBEAM));
} else {
Cursor& curs = *ResMgr::get<CursorRsrc>(cursors[which_c]);
cCursor& curs = *ResMgr::get<CursorRsrc>(cursors[which_c]);
curs.apply();
}
}