From 44405827b07c2a78d15d18c89f71ebe0fc0fb13e Mon Sep 17 00:00:00 2001 From: mniip Date: Wed, 4 Jun 2014 00:35:40 +0400 Subject: [PATCH] Make the upvote more fancy and bigger --- src/graphics/Graphics.cpp | 10 ++++++++-- src/gui/game/GameView.cpp | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/graphics/Graphics.cpp b/src/graphics/Graphics.cpp index c423baeaa..f365c7f0e 100644 --- a/src/graphics/Graphics.cpp +++ b/src/graphics/Graphics.cpp @@ -870,9 +870,15 @@ void Graphics::draw_icon(int x, int y, Icon icon, unsigned char alpha, bool inve break; case IconVoteUp: if(invert) - drawchar(x, y+1, 0xCB, 0, 100, 0, alpha); + { + drawchar(x-11, y+1, 0xCB, 0, 100, 0, alpha); + drawtext(x+2, y+1, "Vote", 0, 100, 0, alpha); + } else - drawchar(x, y+1, 0xCB, 0, 187, 18, alpha); + { + drawchar(x-11, y+1, 0xCB, 0, 187, 18, alpha); + drawtext(x+2, y+1, "Vote", 0, 187, 18, alpha); + } break; case IconVoteDown: if(invert) diff --git a/src/gui/game/GameView.cpp b/src/gui/game/GameView.cpp index b50ddde3c..a44731857 100644 --- a/src/gui/game/GameView.cpp +++ b/src/gui/game/GameView.cpp @@ -283,11 +283,11 @@ GameView::GameView(): v->c->Vote(1); } }; - upVoteButton = new ui::Button(ui::Point(currentX, Size.Y-16), ui::Point(15, 15), "", "Like this save"); + upVoteButton = new ui::Button(ui::Point(currentX, Size.Y-16), ui::Point(39, 15), "", "Like this save"); upVoteButton->SetIcon(IconVoteUp); upVoteButton->Appearance.Margin.Top+=2; upVoteButton->Appearance.Margin.Left+=2; - currentX+=14; + currentX+=38; upVoteButton->SetActionCallback(new UpVoteAction(this)); AddComponent(upVoteButton);