Changed cursor
This commit is contained in:
parent
526ab00c33
commit
61afefa6b5
6 changed files with 57 additions and 3 deletions
|
@ -45,7 +45,7 @@ void Screen::mouseMoveEvent(QMouseEvent* event)
|
|||
{
|
||||
if (planets[i]->IsInside(event->localPos()))
|
||||
{
|
||||
setCursor(Qt::OpenHandCursor);
|
||||
setCursor(Qt::PointingHandCursor);
|
||||
BIND_LMB(lmb_SelectPlanet);
|
||||
hovered = planets[i];
|
||||
break;
|
||||
|
@ -84,6 +84,21 @@ void Screen::mouseReleaseEvent(QMouseEvent* event)
|
|||
mouseDown = false;
|
||||
}
|
||||
|
||||
void Screen::DeletePlanet(Planet* planet)
|
||||
{
|
||||
for (std::vector<Planet*>::iterator it = planets.begin(); it != planets.end(); it++)
|
||||
{
|
||||
if ((*it) == planet)
|
||||
{
|
||||
planets.erase(it);
|
||||
delete planet;
|
||||
hovered = nullptr;
|
||||
selected = nullptr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Screen::Render()
|
||||
{
|
||||
update();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue