Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
prevent tool buttons from being longer than 7 characters
for i=1,250 do elements.property(i,"Name",(("ALL BASE BELONG TO US "):rep(20)..(" "):rep(120)..string.char(10)):rep(70)) end

Could prevent it from lua, but too much work for no reason. Still allows SPWN2 button to work.
  • Loading branch information
jacob1 committed Oct 2, 2015
1 parent 55d20f1 commit 91cf20e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/game/ToolButton.cpp
Expand Up @@ -8,7 +8,7 @@ ToolButton::ToolButton(ui::Point position, ui::Point size, std::string text_, st
Appearance.BorderActive = ui::Colour(255, 0, 0);

//don't use "..." on elements that have long names
buttonDisplayText = ButtonText;
buttonDisplayText = ButtonText.substr(0, 7);
Component::TextPosition(buttonDisplayText);
}

Expand Down

0 comments on commit 91cf20e

Please sign in to comment.