mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 08:49:40 +00:00
changed the markers to look more like morrowind's (hover effect)
This commit is contained in:
parent
d9276ca09d
commit
7eaf5e7f0f
4 changed files with 23 additions and 5 deletions
|
@ -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<MyGUI::ImageBox>("ImageBox",
|
||||
MyGUI::Button* markerWidget = mLocalMap->createWidget<MyGUI::Button>("ButtonImage",
|
||||
widgetCoord, MyGUI::Align::Default, "Marker" + boost::lexical_cast<std::string>(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);
|
||||
|
|
|
@ -71,6 +71,7 @@ set(MYGUI_FILES
|
|||
openmw_magicselection_dialog.layout
|
||||
smallbars.png
|
||||
VeraMono.ttf
|
||||
markers.png
|
||||
)
|
||||
|
||||
|
||||
|
|
BIN
files/mygui/markers.png
Normal file
BIN
files/mygui/markers.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 245 B |
|
@ -236,6 +236,24 @@
|
|||
</Resource>
|
||||
|
||||
|
||||
<Resource type="ResourceImageSet" name="DoorMarker">
|
||||
<Group name="States" texture="markers.png" size="8 8">
|
||||
<Index name="disabled">
|
||||
<Frame point="8 0"/>
|
||||
</Index>
|
||||
<Index name="normal">
|
||||
<Frame point="8 0"/>
|
||||
</Index>
|
||||
<Index name="highlighted">
|
||||
<Frame point="0 0"/>
|
||||
</Index>
|
||||
<Index name="pushed">
|
||||
<Frame point="0 0"/>
|
||||
</Index>
|
||||
</Group>
|
||||
</Resource>
|
||||
|
||||
|
||||
|
||||
<!-- Skins -->
|
||||
|
||||
|
|
Loading…
Reference in a new issue