2D Toolkit Forum
2D Toolkit => Support => Topic started by: Darkfirewolf5 on February 02, 2014, 04:13:01 am
-
Tilemap painting,
Tried to find information about the tile map painting with edge detection was not able to find anything on that at all or how to work it,
Also want to know when we will have painting for tilemap that isnt rectangle base painting, I mean painting much like MS Paint or such, it would make map creation alot easier
-
tk2d doesn't do ms paint style painting - thats not suited for a tile map editor. Tilemaps are just repeated sprites. While you could make them really really small, it would kinda defeat the purpose.
-
Sorry,
I dont think I explained it too well, I am talking about the placing of tiles, I dont like the box style placing, I want to be able to left click and hold it and move the move to paint tiles instead of making a giant rectagle, painting the selected tiles to the tilemap ATM is not that great,
Essentially I do NOT want to place tiles by doing a rectangular type box painting.
-
We had this as an option way back but couldn't fit it in the UI anywhere without cluttering it up further. You can enable it locally by patching the following lines in tk2dTileMap.cs -
if (Event.current.type == EventType.MouseDrag && GUIUtility.hotControl == controlID)
{
UpdateCursorPosition();
UpdateWorkingBrush();
if (editorData.editMode == tk2dTileMapEditorData.EditMode.Paint) {
PencilDrag();
RectangleDragEnd();
RectangleDragBegin();
cursorX0 = cursorX;
cursorY0 = cursorY;
}
if (editorData.editMode == tk2dTileMapEditorData.EditMode.Color) {
-
Thanks for that info,
I tried finding where to put it in that file but i didn't find any of that code, I wasnt able to find it, could it be added back in the future updates like maybe when you click the pencil icon and hold it, it will bring up more options and you can select it much like how Photoshop's UI is, thanks for the help though!
-
Sorry, I typed the wrong filename there... its tk2dTileMapSceneGUI.cs, around line 631 or so.
That sorta click & hold functionality would be ideal, but it would mean writing a control just for this and that would take away time from probably more useful features. We had this as a modifier before, where any operation that could use rectangles could use single tile painting too, but it was far too confusing.
-
:'(
Sorry I dont mean to sound so help less, but I have looked over the code and I just cant seem to locate that file you listed...I feel dumb
Edit: edit i am done finally found it..
-
So I just hacked this together,
if(usePaintStyle == true)
{
RectangleDragEnd();
RectangleDragBegin();
cursorX0 = cursorX;
cursorY0 = cursorY;
}
........
case 'g':
ev.Use();
if(usePaintStyle)
{
usePaintStyle = false;
}
else
{
usePaintStyle = true;
}
break;
Is what I did, so far it is working great! Thanks :)