EmptyEpsilon
EmptyEpsilon copied to clipboard
Self destruct dialog box text overflows
When running a ship with one player controlling four or more stations, text in the self destruct dialog box overflows from the edges of the box:
After some time trying various things I ended up replacing https://github.com/daid/EmptyEpsilon/blob/d3b6e69e8e8d04f920440d11f70320dfbe3d11b3/src/screenComponents/selfDestructEntry.cpp#L74 with the following:
code_label->setSize(594, 20 + 40 * lines);
if (lines > 1)
{
code_label->setAlignment(ATopCenter);
codes = "\n" + codes;
}else{
code_label->setAlignment(ACenter);
}
Which looks decent for 3 codes and only slightly better than current when 2 are displayed.
I also went over the rest of the code a bit and wound up with https://github.com/NinjaSpectre/EmptyEpsilon/commit/ff6410a5712d2dd220680651703a7deb693db44c