fix bug where you couldn't place stamps on top of special signs
This commit is contained in:
parent
181f0cfe5b
commit
35d97eb14d
@ -557,7 +557,7 @@ bool GameController::MouseDown(int x, int y, unsigned button)
|
|||||||
ui::Point point = PointTranslate(ui::Point(x, y));
|
ui::Point point = PointTranslate(ui::Point(x, y));
|
||||||
x = point.X;
|
x = point.X;
|
||||||
y = point.Y;
|
y = point.Y;
|
||||||
if(ret && y<YRES && x<XRES)
|
if (ret && y<YRES && x<XRES && !gameView->GetPlacingSave())
|
||||||
if (gameModel->GetActiveTool(0)->GetIdentifier() != "DEFAULT_UI_SIGN" || button != BUTTON_LEFT) //If it's not a sign tool or you are right/middle clicking
|
if (gameModel->GetActiveTool(0)->GetIdentifier() != "DEFAULT_UI_SIGN" || button != BUTTON_LEFT) //If it's not a sign tool or you are right/middle clicking
|
||||||
{
|
{
|
||||||
sign * foundSign = GetSignAt(x, y);
|
sign * foundSign = GetSignAt(x, y);
|
||||||
@ -573,7 +573,7 @@ bool GameController::MouseUp(int x, int y, unsigned button)
|
|||||||
ui::Point point = PointTranslate(ui::Point(x, y));
|
ui::Point point = PointTranslate(ui::Point(x, y));
|
||||||
x = point.X;
|
x = point.X;
|
||||||
y = point.Y;
|
y = point.Y;
|
||||||
if(ret && y<YRES && x<XRES)
|
if (ret && y<YRES && x<XRES && !gameView->GetPlacingSave())
|
||||||
{
|
{
|
||||||
if (gameModel->GetActiveTool(0)->GetIdentifier() != "DEFAULT_UI_SIGN" || button != BUTTON_LEFT) //If it's not a sign tool or you are right/middle clicking
|
if (gameModel->GetActiveTool(0)->GetIdentifier() != "DEFAULT_UI_SIGN" || button != BUTTON_LEFT) //If it's not a sign tool or you are right/middle clicking
|
||||||
{
|
{
|
||||||
|
@ -618,6 +618,11 @@ ui::Point GameView::GetMousePosition()
|
|||||||
return currentMouse;
|
return currentMouse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GameView::GetPlacingSave()
|
||||||
|
{
|
||||||
|
return selectMode != SelectNone;
|
||||||
|
}
|
||||||
|
|
||||||
void GameView::NotifyActiveToolsChanged(GameModel * sender)
|
void GameView::NotifyActiveToolsChanged(GameModel * sender)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < toolButtons.size(); i++)
|
for(int i = 0; i < toolButtons.size(); i++)
|
||||||
|
@ -136,6 +136,7 @@ public:
|
|||||||
bool GetHudEnable();
|
bool GetHudEnable();
|
||||||
void SetDebugHUD(bool mode);
|
void SetDebugHUD(bool mode);
|
||||||
bool GetDebugHUD();
|
bool GetDebugHUD();
|
||||||
|
bool GetPlacingSave();
|
||||||
bool CtrlBehaviour(){ return ctrlBehaviour; }
|
bool CtrlBehaviour(){ return ctrlBehaviour; }
|
||||||
bool ShiftBehaviour(){ return shiftBehaviour; }
|
bool ShiftBehaviour(){ return shiftBehaviour; }
|
||||||
bool AltBehaviour(){ return altBehaviour; }
|
bool AltBehaviour(){ return altBehaviour; }
|
||||||
|
Reference in New Issue
Block a user