Skip to content

Commit

Permalink
don't resize save buttons in the online save browser, fix selection b…
Browse files Browse the repository at this point in the history
…ug in console
  • Loading branch information
jacob1 committed Mar 25, 2014
1 parent 50bc126 commit 2e6b424
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/gui/interface/Label.cpp
Expand Up @@ -346,8 +346,8 @@ void Label::updateSelection()

void Label::SetDisplayText(std::string newText)
{
displayText = newText;
tDisplayText = displayText;
ClearSelection();
displayText = tDisplayText = newText;
}

void Label::Draw(const Point& screenPos)
Expand Down
9 changes: 3 additions & 6 deletions src/gui/interface/SaveButton.cpp
Expand Up @@ -180,19 +180,16 @@ void SaveButton::Draw(const Point& screenPos)
g->fillrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 100, 170, 255, 100);
}

scaleFactor = (Size.Y-25)/((float)YRES);
thumbBoxSize = ui::Point(((float)XRES)*scaleFactor, ((float)YRES)*scaleFactor);
if(thumbnail)
{
thumbBoxSize = ui::Point(thumbnail->Width, thumbnail->Height);
//thumbBoxSize = ui::Point(thumbnail->Width, thumbnail->Height);
if(save && save->id)
g->draw_image(thumbnail, screenPos.X-3+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, 255);
else
g->draw_image(thumbnail, screenPos.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, 255);
}
else
{
scaleFactor = (Size.Y-25)/((float)YRES);
thumbBoxSize = ui::Point(((float)XRES)*scaleFactor, ((float)YRES)*scaleFactor);
}
if(save)
{
if(save->id)
Expand Down

0 comments on commit 2e6b424

Please sign in to comment.