mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fix tileset selection
This commit is contained in:
parent
3c4bf96b8c
commit
b4b1f4d1a8
|
@ -1807,6 +1807,8 @@ void CEditor::DoMapEditor(CUIRect View, CUIRect ToolBar)
|
|||
// fetch mouse position
|
||||
float wx = UI()->MouseWorldX();
|
||||
float wy = UI()->MouseWorldY();
|
||||
float mx = UI()->MouseX();
|
||||
float my = UI()->MouseY();
|
||||
|
||||
static float s_StartWx = 0;
|
||||
static float s_StartWy = 0;
|
||||
|
@ -1830,6 +1832,8 @@ void CEditor::DoMapEditor(CUIRect View, CUIRect ToolBar)
|
|||
float h = Size*(Screen.h/View.h);
|
||||
float x = -(View.x/Screen.w)*w;
|
||||
float y = -(View.y/Screen.h)*h;
|
||||
wx = x+w*mx/Screen.w;
|
||||
wy = y+h*my/Screen.h;
|
||||
CLayerTiles *t = (CLayerTiles *)GetSelectedLayerType(0, LAYERTYPE_TILES);
|
||||
if(t)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue