mirror of
https://github.com/edubart/otclient.git
synced 2025-10-22 23:35:54 +02:00
@@ -32,9 +32,32 @@ X11Window window;
|
||||
#endif
|
||||
|
||||
#include <framework/core/clock.h>
|
||||
#include <framework/graphics/image.h>
|
||||
|
||||
PlatformWindow& g_window = window;
|
||||
|
||||
int PlatformWindow::loadMouseCursor(const std::string& file, const Point& hotSpot)
|
||||
{
|
||||
ImagePtr image = Image::load(file);
|
||||
|
||||
if(!image) {
|
||||
g_logger.traceError(stdext::format("unable to load cursor image file %s", file));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(image->getBpp() != 4) {
|
||||
g_logger.error("the cursor image must have 4 channels");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(image->getWidth() != 32 || image->getHeight() != 32) {
|
||||
g_logger.error("the cursor image must have 32x32 dimension");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return internalLoadMouseCursor(image, hotSpot);
|
||||
}
|
||||
|
||||
void PlatformWindow::updateUnmaximizedCoords()
|
||||
{
|
||||
if(!isMaximized() && !isFullscreen()) {
|
||||
|
||||
Reference in New Issue
Block a user