Skip to content

Commit ecbbd12

Browse files
committed
#158 Implement sprite/frame editor
1 parent f2d15df commit ecbbd12

38 files changed

+721
-41
lines changed

Assets/LuckyDraw/0.png.meta

122 Bytes
Binary file not shown.

Assets/LuckyDraw/1.png.meta

122 Bytes
Binary file not shown.

Assets/LuckyDraw/2.png.meta

122 Bytes
Binary file not shown.

Assets/LuckyDraw/3.png.meta

122 Bytes
Binary file not shown.

Assets/LuckyDraw/btn_violet.png.meta

122 Bytes
Binary file not shown.

Assets/LuckyDraw/btn_yellow.png.meta

122 Bytes
Binary file not shown.

Assets/LuckyDraw/left.png.meta

122 Bytes
Binary file not shown.

Assets/LuckyDraw/people.png.meta

122 Bytes
Binary file not shown.

Assets/LuckyDraw/right.png.meta

122 Bytes
Binary file not shown.

Assets/LuckyDraw/state_0.png.meta

122 Bytes
Binary file not shown.

Assets/LuckyDraw/state_1.png.meta

122 Bytes
Binary file not shown.

Assets/LuckyDraw/state_2.png.meta

122 Bytes
Binary file not shown.

Assets/LuckyDraw/state_3.png.meta

122 Bytes
Binary file not shown.

Projects/Editor/Source/Editor/AssetEditor/CSpriteEditor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ namespace Skylicht
117117
// show dialog export sprite
118118
// see CSpaceExportSprite
119119
CEditor::getInstance()->exportSprite(
120+
m_settings->GUID.getString(),
120121
path,
121122
pngs,
122123
m_settings->Width.get(),

Projects/Editor/Source/Editor/CEditor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,7 +1302,7 @@ namespace Skylicht
13021302
spaceExport->exportMap(path, x1, y1, x2, y2, zoom, type, gridSize);
13031303
}
13041304

1305-
void CEditor::exportSprite(const char* path, const std::vector<std::string>& pngs, int width, int height, bool alpha)
1305+
void CEditor::exportSprite(const char* id, const char* path, const std::vector<std::string>& pngs, int width, int height, bool alpha)
13061306
{
13071307
m_exportSpriteDialog = new GUI::CDialogWindow(m_canvas, 0.0f, 0.0f, 600.0f, 120.0f);
13081308
m_exportSpriteDialog->setCaption(L"Export Sprite");
@@ -1314,7 +1314,7 @@ namespace Skylicht
13141314

13151315
CSpace* space = getWorkspace(m_exportSpriteDialog);
13161316
CSpaceExportSprite* spaceExport = dynamic_cast<CSpaceExportSprite*>(space);
1317-
spaceExport->exportSprite(path, pngs, width, height, alpha);
1317+
spaceExport->exportSprite(id, path, pngs, width, height, alpha);
13181318
}
13191319

13201320
void CEditor::OnCommandGameObject(GUI::CBase* item)

Projects/Editor/Source/Editor/CEditor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ namespace Skylicht
180180

181181
void exportGMap(const char* path, long x1, long y1, long x2, long y2, int zoom, int type, int gridSize);
182182

183-
void exportSprite(const char* path, const std::vector<std::string>& pngs, int width, int height, bool alpha);
183+
void exportSprite(const char* id, const char* path, const std::vector<std::string>& pngs, int width, int height, bool alpha);
184184
};
185185
}
186186
}

0 commit comments

Comments
 (0)