1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Spaces -> tabs

This commit is contained in:
Ivan Savenko
2024-04-30 11:38:13 +03:00
parent 62bb9fe4b7
commit 0d8d75afd4
18 changed files with 501 additions and 504 deletions

View File

@@ -57,7 +57,7 @@ CursorHandler::CursorHandler()
cursor->preload();
set(Cursor::Map::POINTER);
showType = dynamic_cast<CursorSoftware *>(cursor.get()) ? Cursor::ShowType::SOFTWARE : Cursor::ShowType::HARDWARE;
showType = dynamic_cast<CursorSoftware *>(cursor.get()) ? Cursor::ShowType::SOFTWARE : Cursor::ShowType::HARDWARE;
}
CursorHandler::~CursorHandler() = default;
@@ -293,30 +293,30 @@ void CursorHandler::show()
Cursor::ShowType CursorHandler::getShowType()
{
return showType;
return showType;
}
void CursorHandler::ChangeCursor(Cursor::ShowType showType)
{
if(this->showType == showType)
return;
if(this->showType == showType)
return;
switch(showType)
{
case Cursor::ShowType::SOFTWARE:
cursor.reset(new CursorSoftware());
showType = Cursor::ShowType::SOFTWARE;
cursor->setImage(getCurrentImage(), getPivotOffset());
break;
case Cursor::ShowType::HARDWARE:
cursor.reset(new CursorHardware());
showType = Cursor::ShowType::HARDWARE;
cursor->setImage(getCurrentImage(), getPivotOffset());
break;
}
switch(showType)
{
case Cursor::ShowType::SOFTWARE:
cursor.reset(new CursorSoftware());
showType = Cursor::ShowType::SOFTWARE;
cursor->setImage(getCurrentImage(), getPivotOffset());
break;
case Cursor::ShowType::HARDWARE:
cursor.reset(new CursorHardware());
showType = Cursor::ShowType::HARDWARE;
cursor->setImage(getCurrentImage(), getPivotOffset());
break;
}
}
const Point & CursorHandler::getCursorPosition()
{
return cursor->getCursorPosition();
return cursor->getCursorPosition();
}