Mirage Source
Dont call map editor when moving mouse but staying on same t - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51)
+----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44)
+------ Forum: Tutorials (https://mirage-engine.uk/forums/forumdisplay.php?fid=13)
+------ Thread: Dont call map editor when moving mouse but staying on same t (/showthread.php?tid=2332)



Dont call map editor when moving mouse but staying on same t - Joost - 01-11-2008

ile


Basicly, if you move your mouse while it's pressed, the map editor lays down a tile. Even though that tile is already there. Not required, easy fix

Private Sub picScreen_MouseMove
Code:
If CurX = X \ PIX_X And CurY = Y \ PIC_Y And Button = vbLeftButton Then Exit Sub

And right above that, under If InEditor Then add
Code:
CurX = 100
        CurY = 100

Just to make sure you can edit a tile you just placed.


Re: Dont call map editor when moving mouse but staying on same t - Labmonkey - 03-11-2008

Code:
CurX = 100
        CurY = 100
Joost, please explain..


Re: Dont call map editor when moving mouse but staying on same t - Joost - 03-11-2008

I probably added that to reset the X and Y if you select a different tile, because (0,0) is a tile, I couldn't set them both to 0. Best way would've been setting them to MAX Y/X + 1 or something, but 100 works as welll Big Grin


Re: Dont call map editor when moving mouse but staying on same t - Labmonkey - 03-11-2008

It appears you reset curx and y, and then check if you were on the same tile as the reset values, which means

Code:
If CurX = X \ PIX_X And CurY = Y \ PIC_Y And Button = vbLeftButton Then Exit Sub
will never get called.