Float menu option dropped on multi column

Started by Fluffy (l2032), February 16, 2016, 06:33:38 PM

Previous topic - Next topic

Fluffy (l2032)

When the float menu options get wrapped over multiple columns, there is one too many option rendered in each column, resulting in an option being drawn outside of the floatmenu rect, and thus dropped.

The following line in Verse.FloatMenu.DoWindowContents( Rect ) ;

if ((double) num1 > (double) this.ColumnMaxOptionCount)
Where num1 is the current y or row index (decompilation artifact) should instead read;
if ((double) num1 >= (double) this.ColumnMaxOptionCount)

Also, why are two ints geting cast to doubles for a comparison? That seems like a recipe for trouble in and of itself.


ison

Thanks for pointing out the exact location in the code where the bug was.

FloatMenu has changed since A12, and it seems that float menu options are no longer dropped.

Quote from: Fluffy (l2032) on February 16, 2016, 06:33:38 PM
Also, why are two ints geting cast to doubles for a comparison? That seems like a recipe for trouble in and of itself.

True, this doesn't happen in the new version of FloatMenu.

Thanks for the report.