mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-11 19:04:05 +02:00
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.
This commit is contained in:
@@ -8,7 +8,7 @@ ToolButton::ToolButton(ui::Point position, ui::Point size, std::string text_, st
|
|||||||
Appearance.BorderActive = ui::Colour(255, 0, 0);
|
Appearance.BorderActive = ui::Colour(255, 0, 0);
|
||||||
|
|
||||||
//don't use "..." on elements that have long names
|
//don't use "..." on elements that have long names
|
||||||
buttonDisplayText = ButtonText;
|
buttonDisplayText = ButtonText.substr(0, 7);
|
||||||
Component::TextPosition(buttonDisplayText);
|
Component::TextPosition(buttonDisplayText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user