mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-28 10:20:04 +02:00
fix bug where you couldn't place stamps on top of special signs
This commit is contained in:
@@ -557,7 +557,7 @@ bool GameController::MouseDown(int x, int y, unsigned button)
|
||||
ui::Point point = PointTranslate(ui::Point(x, y));
|
||||
x = point.X;
|
||||
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
|
||||
{
|
||||
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));
|
||||
x = point.X;
|
||||
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
|
||||
{
|
||||
|
@@ -618,6 +618,11 @@ ui::Point GameView::GetMousePosition()
|
||||
return currentMouse;
|
||||
}
|
||||
|
||||
bool GameView::GetPlacingSave()
|
||||
{
|
||||
return selectMode != SelectNone;
|
||||
}
|
||||
|
||||
void GameView::NotifyActiveToolsChanged(GameModel * sender)
|
||||
{
|
||||
for(int i = 0; i < toolButtons.size(); i++)
|
||||
|
@@ -136,6 +136,7 @@ public:
|
||||
bool GetHudEnable();
|
||||
void SetDebugHUD(bool mode);
|
||||
bool GetDebugHUD();
|
||||
bool GetPlacingSave();
|
||||
bool CtrlBehaviour(){ return ctrlBehaviour; }
|
||||
bool ShiftBehaviour(){ return shiftBehaviour; }
|
||||
bool AltBehaviour(){ return altBehaviour; }
|
||||
|
Reference in New Issue
Block a user