Changed “refresh server list” icon

This commit is contained in:
yvt 2013-11-24 22:55:07 +09:00
parent 3f2f03ef63
commit 90c8e99365
3 changed files with 21 additions and 5 deletions

View File

@ -1,6 +1,9 @@
All paks for development vesion:
http://yvt.jp/files/programs/osppaks/DevPaks13.zip
http://yvt.jp/files/programs/osppaks/DevPaks14.zip
(These paks are not included in the source tree because they contains some
non-opensource materials and they seem too large to include in the git tree.)

View File

@ -235,6 +235,21 @@ namespace spades {
}
class RefreshButton: spades::ui::SimpleButton {
RefreshButton(spades::ui::UIManager@ manager){
super(manager);
}
void Render() {
SimpleButton::Render();
Renderer@ renderer = Manager.Renderer;
Vector2 pos = ScreenPosition;
Vector2 size = Size;
Image@ img = renderer.RegisterImage("Gfx/UI/Refresh.png");
renderer.DrawImage(img, pos + (size - Vector2(16.f, 16.f)) * 0.5f);
}
}
class ProtocolButton: spades::ui::SimpleButton {
ProtocolButton(spades::ui::UIManager@ manager){
super(manager);
@ -339,9 +354,8 @@ namespace spades {
AddChild(button);
}
{
spades::ui::Button button(Manager);
button.Caption = "Refresh Server List";
button.Bounds = AABB2(contentsLeft + contentsWidth - 364.f, footerPos, 160.f, 30.f);
RefreshButton button(Manager);
button.Bounds = AABB2(contentsLeft + contentsWidth - 364.f, footerPos, 30.f, 30.f);
button.Activated = EventHandler(this.OnRefreshServerListPressed);
AddChild(button);
}

View File

@ -174,7 +174,6 @@ namespace spades {
class SimpleButton: spades::ui::Button {
SimpleButton(spades::ui::UIManager@ manager){
super(manager);
Toggle = true;
}
void Render() {
Renderer@ renderer = Manager.Renderer;