summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itempopup.cpp2
-rw-r--r--src/gui/minimap.cpp13
-rw-r--r--src/gui/skilldialog.cpp2
-rw-r--r--src/gui/widgets/emoteshortcutcontainer.cpp3
-rw-r--r--src/gui/widgets/tabbedarea.cpp2
5 files changed, 14 insertions, 8 deletions
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
index 1a8dcc35d..493b5041a 100644
--- a/src/gui/itempopup.cpp
+++ b/src/gui/itempopup.cpp
@@ -103,7 +103,7 @@ void ItemPopup::setItem(const Item *item, bool showImage)
setItem(ii, item->getColor(), showImage);
if (item->getRefine() > 0)
{
- mLastName = item->getId();
+ mLastName = ii.getName();
mLastColor = item->getColor();
if (serverVersion > 0)
{
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp
index de9d2a150..e5371eaf3 100644
--- a/src/gui/minimap.cpp
+++ b/src/gui/minimap.cpp
@@ -208,9 +208,12 @@ void Minimap::draw(gcn::Graphics *graphics)
{
const Vector &p = player_node->getPosition();
mapOriginX = ((a.width) / 2) - static_cast<int>((p.x
- + viewport->getCameraRelativeX()) * mWidthProportion) / 32;
+ + viewport->getCameraRelativeX()) * static_cast<int>(
+ mWidthProportion)) / 32;
+
mapOriginY = ((a.height) / 2) - static_cast<int>((p.y
- + viewport->getCameraRelativeX()) * mHeightProportion) / 32;
+ + viewport->getCameraRelativeX()) * static_cast<int>(
+ mHeightProportion)) / 32;
const int minOriginX = a.width - mMapImage->getWidth();
const int minOriginY = a.height - mMapImage->getHeight();
@@ -304,8 +307,10 @@ void Minimap::draw(gcn::Graphics *graphics)
+ viewport->getCameraRelativeY())
* mHeightProportion) / 32 + mapOriginY;
- const int w = graph->getWidth() * mWidthProportion / 32;
- const int h = graph->getHeight() * mHeightProportion / 32;
+ const int w = static_cast<int>(static_cast<float>(
+ graph->getWidth()) * mWidthProportion / 32);
+ const int h = static_cast<int>(static_cast<float>(
+ graph->getHeight()) * mHeightProportion / 32);
if (w <= a.width)
{
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index 4a264e113..fe2325ab8 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -451,7 +451,7 @@ void SkillDialog::addSkill(int id, int level, bool modifiable)
skill->modifiable = modifiable;
skill->visible = false;
skill->model = mDefaultModel;
- skill->skillLevel = level;
+ skill->skillLevel = strprintf(_("Lvl: %d"), level);
skill->update();
mDefaultModel->addSkill(skill);
diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp
index f6762a5cb..683b02fe6 100644
--- a/src/gui/widgets/emoteshortcutcontainer.cpp
+++ b/src/gui/widgets/emoteshortcutcontainer.cpp
@@ -162,7 +162,8 @@ void EmoteShortcutContainer::mouseDragged(gcn::MouseEvent &event)
return;
// const unsigned char emoteId = emoteShortcut->getEmote(index);
- const unsigned char emoteId = index + 1;
+ const unsigned char emoteId
+ = static_cast<unsigned char>(index + 1);
if (emoteId)
{
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 67882deca..7da6f9398 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -156,7 +156,7 @@ void TabbedArea::removeTab(Tab *tab)
}
if (tabIndexToBeSelected >= static_cast<signed>(mTabs.size()))
- tabIndexToBeSelected = mTabs.size() - 1;
+ tabIndexToBeSelected = static_cast<int>(mTabs.size()) - 1;
if (tabIndexToBeSelected < -1)
tabIndexToBeSelected = -1;