From 7eaf5e7f0f3ebb4f4fed3f383eec2781b55738ff Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 28 Aug 2012 18:40:11 +0200 Subject: [PATCH] changed the markers to look more like morrowind's (hover effect) --- apps/openmw/mwgui/map_window.cpp | 9 ++++----- files/mygui/CMakeLists.txt | 1 + files/mygui/markers.png | Bin 0 -> 245 bytes files/mygui/openmw_resources.xml | 18 ++++++++++++++++++ 4 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 files/mygui/markers.png 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 0000000000000000000000000000000000000000..76b6b9913b01cd9f805d1a9d7ff7693cf49c99fe GIT binary patch literal 245 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~c!3HEhl+{lMQfx`y?k)`fL2$v|<&%LToCO|{ z#S9GG!XV7ZFl&wkP>{XE)7O>#4u_0@5~t(+j%PrjCQlc~5RLQ6JiQ!qPd2bbNJdQD z$+KUw&iKLP^u&aOgov#*p;F9Z0BR06 zaSc8`saxaIQNyTA9w6{J(G|8nV(z}2qnk?DWEf`K2s5`fu+9{g60{PwoxpMOFz*4; i2?h + + + + + + + + + + + + + + + + + +