Page 1 of 1

menu package

Posted: Sun Feb 26, 2017 12:31 pm
by velocity
When creating a PagedMenu

Syntax: Select all

menu = PagedMenu(

it has 8.Back, 9.Next, 0.Close none-highlighted and it displays 'the amount of pages' [1/1], when there is less than 8 items, which is weird.

Is it possible to add a feature that allows you to hide the 8. Back, 9. Next, 0. Close and amount of pages, when the menu has fewer items than 8 (1 page) or even when the menu has multiple pages because on some level the buttons seem redundant before there is a next page available and it takes away the ability to do menu designs. Also, a feature that allows you to change the actual text of the buttons.

Re: menu package

Posted: Sun Feb 26, 2017 1:17 pm
by Ayuto
The reason why Back and Next are always shown is that it provides a constant appearance. If you whish to customize this behaviour, you can subclass PagedRadioMenu and implement your own _format_footer method: ... #L234-L270

If you want to change the header, you need to override _format_header: ... #L179-L201