diff --git a/media/coordinates.png b/media/coordinates.png new file mode 100644 index 0000000..5230105 Binary files /dev/null and b/media/coordinates.png differ diff --git a/media/texture_terrain.png b/media/texture_terrain.png index f66158a..4833198 100644 Binary files a/media/texture_terrain.png and b/media/texture_terrain.png differ diff --git a/media/texture_terrain_plain.png b/media/texture_terrain_plain.png deleted file mode 100644 index 4833198..0000000 Binary files a/media/texture_terrain_plain.png and /dev/null differ diff --git a/src/Editor.cpp b/src/Editor.cpp index b3ffd51..245de27 100644 --- a/src/Editor.cpp +++ b/src/Editor.cpp @@ -16,6 +16,27 @@ Editor::Editor() : } } +void drawCoord(IGUIFont* font, IVideoDriver *driver, unsigned int x, unsigned int y, const wchar_t* xlabel, const wchar_t* ylabel) +{ + static ITexture *axes = driver->getTexture("media/coordinates.png"); + driver->draw2DImage( + axes, + position2d(x, y), + rect(0, 0, 32, 32), + NULL, SColor(255, 255, 255, 255), true + ); + font->draw( + ylabel, + core::rect(x - 2, y - 20, 300, 50), + video::SColor(255, 255, 255, 255) + ); + font->draw( + xlabel, + core::rect(x + 40, y + 22, 300, 50), + video::SColor(255, 255, 255, 255) + ); +} + bool Editor::run(IrrlichtDevice* irr_device,Configuration* conf) { // Do Irrlicht Stuff @@ -126,6 +147,9 @@ bool Editor::run(IrrlichtDevice* irr_device,Configuration* conf) driver->draw2DLine(vector2d(0, ResY/2-1), vector2d(ResX, ResY/2-1), SColor(175,255,255,255)); driver->draw2DLine(vector2d(ResX/2, 0), vector2d(ResX/2, ResY), SColor(175,255,255,255)); driver->draw2DLine(vector2d(ResX/2+1, 0), vector2d(ResX/2+1, ResY), SColor(175,255,255,255)); + drawCoord(guienv->getSkin()->getFont(), driver, ResX/2 + 10, ResY/2 - 42, L"X", L"Z"); + drawCoord(guienv->getSkin()->getFont(), driver, 10, ResY - 42, L"X", L"Y"); + drawCoord(guienv->getSkin()->getFont(), driver, ResX/2 + 10, ResY - 42, L"Z", L"Y"); } else if (camera[currentWindow]) { smgr->setActiveCamera(camera[currentWindow]); driver->setViewPort(rect(0, 0, ResX, ResY)); diff --git a/src/NBEditor.cpp b/src/NBEditor.cpp old mode 100755 new mode 100644