LynnaLab.RoomEditor.OnClicked C# (CSharp) Method

OnClicked() private method

private OnClicked ( int x, int y ) : void
x int
y int
return void
        void OnClicked(int x, int y)
        {
            x /= TileWidth;
            y /= TileHeight;
            if (!ViewObjects) {
                room.SetTile(x, y, client.SelectedIndex);
                this.QueueDrawArea(x * TileWidth, y * TileWidth, TileWidth - 1, TileHeight - 1);
            }
            else {
                if (objectEditor != null) {
                    ObjectGroupEditor editor = objectEditor;
                    while (hoveringObjectIndices.Count > 1) {
                        editor.SelectedIndex = hoveringObjectIndices[0];
                        hoveringObjectIndices.RemoveAt(0);
                        editor = editor.SubEditor;
                    }
                    if (hoveringObjectIndices.Count == 1) {
                        editor.SelectedIndex = hoveringObjectIndices[0];
                        draggingObject = true;
                    }
                }
            }
        }