Permalink
Browse files

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 91cf20e521c7d8d9b290e9ac01b143fb525ae086
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/gui/game/ToolButton.cpp
@@ -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);
}

0 comments on commit 91cf20e

Please sign in to comment.