Skip to content
Snippets Groups Projects
Commit 5f6232a9 authored by Trandinh Thien's avatar Trandinh Thien
Browse files

Fixed issue where even though dropdownmenu wasnt displayed, it was still...

Fixed issue where even though dropdownmenu wasnt displayed, it was still clickable - resulting in it preventing player from moving unit to where dropdownmenu was previously
parent 5724bbcd
No related branches found
No related tags found
No related merge requests found
......@@ -224,7 +224,7 @@ namespace Controller
#endregion
#region Drop Down menu
if (GameState.getMenuOpen()) // if dropDowMenu should be opened, draw dropDownMenu
if ((GameState.getMenuOpen())&&(!GameState.getIsAnimating())) // if dropDowMenu should be opened, draw dropDownMenu
{
foreach (MenuButton button in unit.getMenuButtons())
{
......
......@@ -159,7 +159,10 @@ namespace Controller
int buttonY = (int) menuButtons[i].getPixelCoordinates().Y;
if (buttonX <= clickX && clickX < buttonX+128 && buttonY <= clickY && clickY < buttonY+32)
{
if (GameState.getMenuOpen())
{
return menuButtons[i];
}
}
}
return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment