EmptyEpsilon icon indicating copy to clipboard operation
EmptyEpsilon copied to clipboard

Self destruct dialog box text overflows

Open oznogon opened this issue 7 years ago • 1 comments

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:

selfdestruct1 selfdestruct2

oznogon avatar Jan 22 '18 05:01 oznogon

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

NinjaSpectre avatar Jan 23 '18 22:01 NinjaSpectre