[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] menu_popup() ideas



Hi list,

 I have looked at the MENU structure used for menu_popup() call and have
found that there are inconsitencies in the documentation. The 'scroll'
element is in some documentation said to be enabled when it is set to
-1, while other says a value of 1 enabled scroll. However,  I think that
the correct (and this is how n.aes act) is that a value of -1 enables
the popup scroll when it contains more than 8 entries. It has come to my
attention that early official documentation from Atari also states 1 as
the enable-value, but was changed to -1 in later revisions.

 After doing some tests, mainly by Lonny, it turns out that N.AES
enables scroll when 'scroll' is set to -1, which is correct. Any other
value turns scrolling off. XaAES, when only checking for a non-zero
value (either 1 or -1), to turn scrolling on/off gave aMail popup (the
popup that appears when you click to open 'To:' popup in the send
dialog). This does not happen under N.AES. This leads me to the
conclusion that as of now, only a 'scroll' value of -1 should enable
scroll when more than 8 entries are present.

 Now for the extention I want to propose;

 1. If ('scroll' == -1), enable scrolling when entries > 8
 
 2. If ('scroll' > 1), enable scrolling when
    entries > ('scroll' < 8 ? 8 : 'scroll')

 3. If ('scroll' >= 0 && 'scroll' < 2) then disable scroll.


 This should not break any existing apps, since I think most apps
actually use -1 to enable popup, while offering a way to set the number
of entries to the app.

 This implementation is present in XaAES as of next cvs checkin from me,
but if there are strong objections I will remove it again. Ideas?
Comments?



 Best Regards
Odd Skancke