summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-23 20:17:46 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-23 20:17:46 +0300
commiteed93efa8aa8539b47f225b4abafe6d59bebe67d (patch)
tree222fa8dcc991d9603d94645ad66cedd488648042 /src/gui
parentbec451007ce9471004ec4a8357cea3cb7712de55 (diff)
downloadplus-eed93efa8aa8539b47f225b4abafe6d59bebe67d.tar.gz
plus-eed93efa8aa8539b47f225b4abafe6d59bebe67d.tar.bz2
plus-eed93efa8aa8539b47f225b4abafe6d59bebe67d.tar.xz
plus-eed93efa8aa8539b47f225b4abafe6d59bebe67d.zip
Rename drawImage2 methods into drawImage.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/font.cpp4
-rw-r--r--src/gui/gui.cpp4
-rw-r--r--src/gui/widgets/avatarlistbox.cpp2
-rw-r--r--src/gui/widgets/browserbox.cpp2
-rw-r--r--src/gui/widgets/button.cpp4
-rw-r--r--src/gui/widgets/checkbox.cpp2
-rw-r--r--src/gui/widgets/desktop.cpp2
-rw-r--r--src/gui/widgets/dropdown.cpp4
-rw-r--r--src/gui/widgets/dropshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/emotepage.cpp2
-rw-r--r--src/gui/widgets/extendedlistbox.cpp4
-rw-r--r--src/gui/widgets/icon.cpp2
-rw-r--r--src/gui/widgets/itemcontainer.cpp6
-rw-r--r--src/gui/widgets/itemshortcutcontainer.cpp6
-rw-r--r--src/gui/widgets/radiobutton.cpp2
-rw-r--r--src/gui/widgets/scrollarea.cpp2
-rw-r--r--src/gui/widgets/shoplistbox.cpp2
-rw-r--r--src/gui/widgets/shortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/slider.cpp12
-rw-r--r--src/gui/widgets/spellshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/tabs/tab.cpp2
-rw-r--r--src/gui/widgets/window.cpp6
-rw-r--r--src/gui/windows/equipmentwindow.cpp8
-rw-r--r--src/gui/windows/minimap.cpp2
-rw-r--r--src/gui/windows/outfitwindow.cpp4
-rw-r--r--src/gui/windows/skilldialog.cpp2
26 files changed, 46 insertions, 46 deletions
diff --git a/src/gui/font.cpp b/src/gui/font.cpp
index e1d793ce1..8c022f99d 100644
--- a/src/gui/font.cpp
+++ b/src/gui/font.cpp
@@ -522,7 +522,7 @@ void Font::drawString(Graphics *const graphics,
if (image)
{
image->setAlpha(alpha);
- g->drawImage2(image, x, y);
+ g->drawImage(image, x, y);
}
}
else
@@ -544,7 +544,7 @@ void Font::drawString(Graphics *const graphics,
const Image *const image = chunk2->img;
if (image)
- g->drawImage2(image, x, y);
+ g->drawImage(image, x, y);
}
BLOCK_END("Font::drawString")
}
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 07aca0c81..5914e43d9 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -451,7 +451,7 @@ void Gui::draw()
{
const int posX = mouseX - (image->mBounds.w / 2);
const int posY = mouseY - (image->mBounds.h / 2);
- mGraphics->drawImage2(image, posX, posY);
+ mGraphics->drawImage(image, posX, posY);
}
if (mGuiFont)
{
@@ -469,7 +469,7 @@ void Gui::draw()
if (mouseCursor)
{
mouseCursor->setAlpha(mMouseCursorAlpha);
- mGraphics->drawImage2(mouseCursor, mouseX - 15, mouseY - 17);
+ mGraphics->drawImage(mouseCursor, mouseX - 15, mouseY - 17);
}
}
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index cf01517c6..46a78d99e 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -135,7 +135,7 @@ void AvatarListBox::draw(Graphics *graphics)
}
else
{
- graphics->drawImage2(icon, mImagePadding, y + mPadding);
+ graphics->drawImage(icon, mImagePadding, y + mPadding);
}
}
}
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index cfc26da0e..c36a607f4 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -508,7 +508,7 @@ void BrowserBox::draw(Graphics *graphics)
}
else if (part.mImage)
{
- graphics->drawImage2(part.mImage, part.mX, part.mY);
+ graphics->drawImage(part.mImage, part.mX, part.mY);
}
}
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 90c1706b5..2642a67a3 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -507,9 +507,9 @@ void Button::draw(Graphics *graphics)
if (mImages)
{
if (isPressed())
- graphics->drawImage2(mImages[mode], imageX + 1, imageY + 1);
+ graphics->drawImage(mImages[mode], imageX + 1, imageY + 1);
else
- graphics->drawImage2(mImages[mode], imageX, imageY);
+ graphics->drawImage(mImages[mode], imageX, imageY);
}
}
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp
index 63e32a0f9..9fb63b2e8 100644
--- a/src/gui/widgets/checkbox.cpp
+++ b/src/gui/widgets/checkbox.cpp
@@ -167,7 +167,7 @@ void CheckBox::drawBox(Graphics *const graphics)
if (box)
{
- graphics->drawImage2(box,
+ graphics->drawImage(box,
mImagePadding,
(getHeight() - mImageSize) / 2);
}
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp
index a296fb49d..5dca7578c 100644
--- a/src/gui/widgets/desktop.cpp
+++ b/src/gui/widgets/desktop.cpp
@@ -123,7 +123,7 @@ void Desktop::draw(Graphics *graphics)
if (imageHelper->useOpenGL() == RENDER_SOFTWARE)
{
- graphics->drawImage2(mWallpaper,
+ graphics->drawImage(mWallpaper,
(width - wallpWidth) / 2,
(height - wallpHeight) / 2);
}
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 763cf47a5..982b2cf0d 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -251,7 +251,7 @@ void DropDown::draw(Graphics* graphics)
}
else
{
- graphics->drawImage2(image,
+ graphics->drawImage(image,
mImagePadding,
(mDimension.height - image->getHeight()) / 2 + mPadding);
font->drawString(graphics, model->getElementAt(sel),
@@ -305,7 +305,7 @@ void DropDown::drawButton(Graphics *graphics)
Image *image = buttons[mDroppedDown][mPushed];
if (image)
{
- graphics->drawImage2(image,
+ graphics->drawImage(image,
mDimension.width - image->getWidth() - mImagePadding,
(height - image->getHeight()) / 2);
}
diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp
index fcb0f8ea1..c8e4bc2d9 100644
--- a/src/gui/widgets/dropshortcutcontainer.cpp
+++ b/src/gui/widgets/dropshortcutcontainer.cpp
@@ -143,7 +143,7 @@ void DropShortcutContainer::draw(Graphics *graphics)
caption = "Eq.";
image->setAlpha(1.0F);
- graphics->drawImage2(image, itemX, itemY);
+ graphics->drawImage(image, itemX, itemY);
if (item->isEquipped())
graphics->setColorAll(mEquipedColor, mEquipedColor2);
else
diff --git a/src/gui/widgets/emotepage.cpp b/src/gui/widgets/emotepage.cpp
index 2aff81955..139082815 100644
--- a/src/gui/widgets/emotepage.cpp
+++ b/src/gui/widgets/emotepage.cpp
@@ -101,7 +101,7 @@ void EmotePage::draw(Graphics *graphics)
const Image *const image = *it;
if (image)
{
- graphics->drawImage2(image, x, y);
+ graphics->drawImage(image, x, y);
x += emoteWidth;
if (x + emoteWidth > width)
{
diff --git a/src/gui/widgets/extendedlistbox.cpp b/src/gui/widgets/extendedlistbox.cpp
index 13fb70f28..15a52ee82 100644
--- a/src/gui/widgets/extendedlistbox.cpp
+++ b/src/gui/widgets/extendedlistbox.cpp
@@ -147,7 +147,7 @@ void ExtendedListBox::draw(Graphics *graphics)
const Image *const image = model->getImageAt(row1);
if (image)
{
- graphics->drawImage2(image,
+ graphics->drawImage(image,
mImagePadding,
item.y + (height - image->getHeight()) / 2 + mPadding);
}
@@ -182,7 +182,7 @@ void ExtendedListBox::draw(Graphics *graphics)
const Image *const image = model->getImageAt(row1);
if (image)
{
- graphics->drawImage2(image,
+ graphics->drawImage(image,
mImagePadding,
item.y + (height - image->getHeight()) / 2 + mPadding);
}
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp
index 53be9ef91..9a86fc9bf 100644
--- a/src/gui/widgets/icon.cpp
+++ b/src/gui/widgets/icon.cpp
@@ -74,7 +74,7 @@ void Icon::draw(Graphics *graphics)
BLOCK_START("Icon::draw")
if (mImage)
{
- graphics->drawImage2(mImage,
+ graphics->drawImage(mImage,
(mDimension.width - mImage->mBounds.w) / 2,
(mDimension.height - mImage->mBounds.h) / 2);
}
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 0ea3adef1..fe666e6f7 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -276,16 +276,16 @@ void ItemContainer::draw(Graphics *graphics)
if (mShowMatrix[itemIndex] == mSelectedIndex)
{
if (mSelImg)
- graphics->drawImage2(mSelImg, itemX, itemY);
+ graphics->drawImage(mSelImg, itemX, itemY);
}
image->setAlpha(1.0F); // ensure the image if fully drawn...
- graphics->drawImage2(image,
+ graphics->drawImage(image,
itemX + mPaddingItemX,
itemY + mPaddingItemY);
if (mProtectedImg && PlayerInfo::isItemProtected(
item->getId()))
{
- graphics->drawImage2(mProtectedImg,
+ graphics->drawImage(mProtectedImg,
itemX + mPaddingItemX,
itemY + mPaddingItemY);
}
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp
index 83c8820ae..b9dc3bec8 100644
--- a/src/gui/widgets/itemshortcutcontainer.cpp
+++ b/src/gui/widgets/itemshortcutcontainer.cpp
@@ -174,7 +174,7 @@ void ItemShortcutContainer::draw(Graphics *graphics)
caption = "Eq.";
image->setAlpha(1.0F);
- graphics->drawImage2(image, itemX, itemY);
+ graphics->drawImage(image, itemX, itemY);
if (item->isEquipped())
{
graphics->setColorAll(mEquipedColor, mEquipedColor2);
@@ -203,7 +203,7 @@ void ItemShortcutContainer::draw(Graphics *graphics)
if (image)
{
image->setAlpha(1.0F);
- graphics->drawImage2(image, itemX, itemY);
+ graphics->drawImage(image, itemX, itemY);
}
}
@@ -222,7 +222,7 @@ void ItemShortcutContainer::draw(Graphics *graphics)
if (image)
{
image->setAlpha(1.0F);
- graphics->drawImage2(image, itemX, itemY);
+ graphics->drawImage(image, itemX, itemY);
}
font->drawString(graphics, skill->data->shortName, itemX + 2,
diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp
index 7b5c5fa11..bb9ae46f9 100644
--- a/src/gui/widgets/radiobutton.cpp
+++ b/src/gui/widgets/radiobutton.cpp
@@ -150,7 +150,7 @@ void RadioButton::drawBox(Graphics* graphics)
if (box)
{
- graphics->drawImage2(box,
+ graphics->drawImage(box,
mImagePadding,
(getHeight() - mImageSize) / 2);
}
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index 2ca851254..f28f45d78 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -409,7 +409,7 @@ void ScrollArea::drawButton(Graphics *const graphics,
}
if (buttons[dir][state])
- graphics->drawImage2(buttons[dir][state], dim.x, dim.y);
+ graphics->drawImage(buttons[dir][state], dim.x, dim.y);
}
void ScrollArea::calcButton(Graphics *const graphics,
diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp
index 36104241d..45d3022c8 100644
--- a/src/gui/widgets/shoplistbox.cpp
+++ b/src/gui/widgets/shoplistbox.cpp
@@ -154,7 +154,7 @@ void ShopListBox::draw(Graphics *graphics)
if (icon)
{
icon->setAlpha(1.0F);
- graphics->drawImage2(icon, mPadding, y + mPadding);
+ graphics->drawImage(icon, mPadding, y + mPadding);
}
}
if (mSelected == i)
diff --git a/src/gui/widgets/shortcutcontainer.cpp b/src/gui/widgets/shortcutcontainer.cpp
index a7e166da3..b059098b5 100644
--- a/src/gui/widgets/shortcutcontainer.cpp
+++ b/src/gui/widgets/shortcutcontainer.cpp
@@ -110,7 +110,7 @@ void ShortcutContainer::drawBackground(Graphics *g)
{
for (unsigned i = 0; i < mMaxItems; i ++)
{
- g->drawImage2(mBackgroundImg, (i % mGridWidth) * mBoxWidth,
+ g->drawImage(mBackgroundImg, (i % mGridWidth) * mBoxWidth,
(i / mGridWidth) * mBoxHeight);
}
}
diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp
index c785f4016..7a9b38050 100644
--- a/src/gui/widgets/slider.cpp
+++ b/src/gui/widgets/slider.cpp
@@ -222,7 +222,7 @@ void Slider::draw(Graphics *graphics)
{
if (!mHasMouse)
{
- graphics->drawImage2(buttons[0].grid[HSTART], x, y);
+ graphics->drawImage(buttons[0].grid[HSTART], x, y);
const int width = buttons[0].grid[HSTART]->getWidth();
w -= width + buttons[0].grid[HEND]->getWidth();
x += width;
@@ -234,18 +234,18 @@ void Slider::draw(Graphics *graphics)
}
x += w;
- graphics->drawImage2(buttons[0].grid[HEND], x, y);
+ graphics->drawImage(buttons[0].grid[HEND], x, y);
const Image *const img = buttons[0].grid[HGRIP];
if (img)
{
- graphics->drawImage2(img, getMarkerPosition(),
+ graphics->drawImage(img, getMarkerPosition(),
(mDimension.height - img->getHeight()) / 2);
}
}
else
{
- graphics->drawImage2(buttons[1].grid[HSTART], x, y);
+ graphics->drawImage(buttons[1].grid[HSTART], x, y);
const int width = buttons[1].grid[HSTART]->getWidth();
w -= width;
@@ -261,12 +261,12 @@ void Slider::draw(Graphics *graphics)
x += w;
if (buttons[1].grid[HEND])
- graphics->drawImage2(buttons[1].grid[HEND], x, y);
+ graphics->drawImage(buttons[1].grid[HEND], x, y);
const Image *const img = buttons[1].grid[HGRIP];
if (img)
{
- graphics->drawImage2(img, getMarkerPosition(),
+ graphics->drawImage(img, getMarkerPosition(),
(mDimension.height - img->getHeight()) / 2);
}
}
diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp
index 239fc6797..f1d4d0cd1 100644
--- a/src/gui/widgets/spellshortcutcontainer.cpp
+++ b/src/gui/widgets/spellshortcutcontainer.cpp
@@ -133,7 +133,7 @@ void SpellShortcutContainer::draw(Graphics *graphics)
if (image)
{
image->setAlpha(1.0F);
- graphics->drawImage2(image, itemX, itemY);
+ graphics->drawImage(image, itemX, itemY);
}
}
diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp
index 2d91129f2..96ae76787 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -291,7 +291,7 @@ void Tab::draw(Graphics *graphics)
if (skin1)
{
const int padding = skin1->getPadding();
- graphics->drawImage2(mImage, padding, padding);
+ graphics->drawImage(mImage, padding, padding);
}
}
}
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 3404bb573..9a43a305b 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -334,18 +334,18 @@ void Window::draw(Graphics *graphics)
const Image *const button = mSkin->getCloseImage(
mResizeHandles == CLOSE);
if (button)
- graphics->drawImage2(button, mCloseRect.x, mCloseRect.y);
+ graphics->drawImage(button, mCloseRect.x, mCloseRect.y);
}
// Draw Sticky Button
if (mStickyButton)
{
const Image *const button = mSkin->getStickyImage(mSticky);
if (button)
- graphics->drawImage2(button, mStickyRect.x, mStickyRect.y);
+ graphics->drawImage(button, mStickyRect.x, mStickyRect.y);
}
if (mGrip)
- graphics->drawImage2(mGrip, mGripRect.x, mGripRect.y);
+ graphics->drawImage(mGrip, mGripRect.x, mGripRect.y);
}
// Draw title
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index a50d0e9fa..ea7944f94 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -202,12 +202,12 @@ void EquipmentWindow::draw(Graphics *graphics)
continue;
if (i == mSelected)
{
- graphics->drawImage2(mSlotHighlightedBackground,
+ graphics->drawImage(mSlotHighlightedBackground,
box->x, box->y);
}
else
{
- graphics->drawImage2(mSlotBackground, box->x, box->y);
+ graphics->drawImage(mSlotBackground, box->x, box->y);
}
}
}
@@ -234,7 +234,7 @@ void EquipmentWindow::draw(Graphics *graphics)
{
image->setAlpha(1.0F); // Ensure the image is drawn
// with maximum opacity
- graphics->drawImage2(image, box->x + mItemPadding,
+ graphics->drawImage(image, box->x + mItemPadding,
box->y + mItemPadding);
if (i == EQUIP_PROJECTILE_SLOT)
{
@@ -249,7 +249,7 @@ void EquipmentWindow::draw(Graphics *graphics)
}
else if (box->image)
{
- graphics->drawImage2(box->image,
+ graphics->drawImage(box->image,
box->x + mItemPadding,
box->y + mItemPadding);
}
diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp
index dd8a1d2b7..4c246aed4 100644
--- a/src/gui/windows/minimap.cpp
+++ b/src/gui/windows/minimap.cpp
@@ -284,7 +284,7 @@ void Minimap::draw(Graphics *graphics)
mMapOriginY = 0;
}
- graphics->drawImage2(mMapImage, mMapOriginX, mMapOriginY);
+ graphics->drawImage(mMapImage, mMapOriginX, mMapOriginY);
}
const ActorSprites &actors = actorManager->getAll();
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp
index acf681cf4..0f25b84a6 100644
--- a/src/gui/windows/outfitwindow.cpp
+++ b/src/gui/windows/outfitwindow.cpp
@@ -347,7 +347,7 @@ void OutfitWindow::draw(Graphics *graphics)
const Image *const image = item->getImage();
if (image)
{
- graphics->drawImage2(image, itemX, itemY);
+ graphics->drawImage(image, itemX, itemY);
foundItem = true;
}
}
@@ -358,7 +358,7 @@ void OutfitWindow::draw(Graphics *graphics)
mItemColors[mCurrentOutfit][i]);
if (image)
{
- graphics->drawImage2(image, itemX, itemY);
+ graphics->drawImage(image, itemX, itemY);
image->decRef();
}
}
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index d39d7061b..1346c8e95 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -135,7 +135,7 @@ class SkillListBox final : public ListBox
const SkillData *const data = e->data;
const int yPad = y + mPadding;
const std::string &description = data->description;
- graphics->drawImage2(data->icon, mPadding, yPad);
+ graphics->drawImage(data->icon, mPadding, yPad);
font->drawString(graphics, data->name, mTextPadding, yPad);
if (!description.empty())
{