diff --git a/apps/openmw/mwgui/map_window.cpp b/apps/openmw/mwgui/map_window.cpp index 44baeddcb..c5c3dff92 100644 --- a/apps/openmw/mwgui/map_window.cpp +++ b/apps/openmw/mwgui/map_window.cpp @@ -154,22 +154,21 @@ void LocalMapBase::setActiveCell(const int x, const int y, bool interior) nX = (marker.x - cellSize * (x+mx-1)) / cellSize; nY = 1 - (marker.y - cellSize * (y-(my-1))) / cellSize; - widgetCoord = MyGUI::IntCoord(nX * 512 - 3 + mx * 512, nY * 512 - 3 + my * 512, 7, 7); + widgetCoord = MyGUI::IntCoord(nX * 512 - 4 + mx * 512, nY * 512 - 4 + my * 512, 8, 8); } else { Ogre::Vector2 position (marker.x, -marker.y); MWBase::Environment::get().getWorld ()->getInteriorMapPosition (position, nX, nY, cellDx, cellDy); - widgetCoord = MyGUI::IntCoord(nX * 512 - 3 + (1+cellDx-x) * 512, nY * 512 - 3 + (1+cellDy-y) * 512, 7, 7); + widgetCoord = MyGUI::IntCoord(nX * 512 - 4 + (1+cellDx-x) * 512, nY * 512 - 4 + (1+cellDy-y) * 512, 8, 8); } static int counter = 0; ++counter; - MyGUI::ImageBox* markerWidget = mLocalMap->createWidget("ImageBox", + MyGUI::Button* markerWidget = mLocalMap->createWidget("ButtonImage", widgetCoord, MyGUI::Align::Default, "Marker" + boost::lexical_cast(counter)); - markerWidget->setImageTexture ("textures\\door_icon.dds"); - markerWidget->setImageCoord (MyGUI::IntCoord(0,0,7,7)); + markerWidget->setImageResource("DoorMarker"); markerWidget->setUserString("ToolTipType", "Layout"); markerWidget->setUserString("ToolTipLayout", "TextToolTip"); markerWidget->setUserString("Caption_Text", marker.name); diff --git a/files/mygui/CMakeLists.txt b/files/mygui/CMakeLists.txt index 2e448a369..70f7282e5 100644 --- a/files/mygui/CMakeLists.txt +++ b/files/mygui/CMakeLists.txt @@ -71,6 +71,7 @@ set(MYGUI_FILES openmw_magicselection_dialog.layout smallbars.png VeraMono.ttf + markers.png ) diff --git a/files/mygui/markers.png b/files/mygui/markers.png new file mode 100644 index 000000000..76b6b9913 Binary files /dev/null and b/files/mygui/markers.png differ diff --git a/files/mygui/openmw_resources.xml b/files/mygui/openmw_resources.xml index 83461bbe8..5a695515d 100644 --- a/files/mygui/openmw_resources.xml +++ b/files/mygui/openmw_resources.xml @@ -236,6 +236,24 @@ + + + + + + + + + + + + + + + + + +