From 3d85803d9a43c779f522a936df068a24ca6f7f2d Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sat, 1 Nov 2008 14:38:59 +0000 Subject: Merged revisions 4110-4111,4116 via svnmerge from https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/branches/0.0 ........ r4110 | peaveydk | 2008-04-17 00:57:49 +0200 (Thu, 17 Apr 2008) | 1 line Fix shop list not to scroll to top when selling. Redo of revision 3801 due to changes in guichan 0.8.0. ........ r4111 | peaveydk | 2008-04-17 02:08:28 +0200 (Thu, 17 Apr 2008) | 1 line fixes for r4110, have to account for index value and add 1 to get the right scroll position. ........ r4116 | peaveydk | 2008-04-17 14:48:43 +0200 (Thu, 17 Apr 2008) | 1 line Draw NPCs in yellow on minimap and skip drawing of warps. Based on idea by leeor_net. ........ --- src/gui/minimap.cpp | 7 ++++--- src/gui/sell.cpp | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index ca6f4fd7..5f768609 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -77,9 +77,10 @@ void Minimap::draw(gcn::Graphics *graphics) { Window::draw(graphics); - if (mMapImage != NULL) + if (mMapImage) { - static_cast(graphics)->drawImage(mMapImage, getPadding(), getTitleBarHeight()); + static_cast(graphics)->drawImage( + mMapImage, getPadding(), getTitleBarHeight()); } Beings &beings = beingManager->getAll(); @@ -110,7 +111,7 @@ void Minimap::draw(gcn::Graphics *graphics) break; default: - break; + continue; } const int offset = (dotSize - 1) / 2; diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp index e101ad39..37626155 100644 --- a/src/gui/sell.cpp +++ b/src/gui/sell.cpp @@ -171,6 +171,11 @@ void SellDialog::action(const gcn::ActionEvent &event) mShopItemList->setSelected(-1); mShopItems->getShop()->erase( mShopItems->getShop()->begin() + selectedItem); + + gcn::Rectangle scroll; + scroll.y = mShopItemList->getRowHeight() * (selectedItem + 1); + scroll.height = mShopItemList->getRowHeight(); + mShopItemList->showPart(scroll); } else { -- cgit v1.2.3-70-g09d2