<div dir="ltr"><div><div>Hmmm... I certainly wouldn't want MenuDef menus to be resized to fit the window by default.<br><br></div>I would also want separate settings for whether or not a menudef should try to fit vertically or horizontally, since I think I would often want a vertically sizing menu, but only rarely would I want it to horizontally size too.<br><br></div><div>The approach I used for resizing the MenuDef menu in edit_platform_options was fairly crude and simplistic, but it was adequate.<br><br>---<br></div><div>James<br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 7, 2016 at 1:54 AM, Ralph Versteegen <span dir="ltr"><<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 7 April 2016 at 20:53, Ralph Versteegen <<a href="mailto:teeemcee@gmail.com">teeemcee@gmail.com</a>> wrote:<br>
> Awesome! This is something I was hoping we would do soon. When I have<br>
> some time I'll try to get gfx_directx and gfx_fb to support changing<br>
> the resolution, and then we could change Custom's default<br>
> resolution...<br>
><br>
> A month ago I also started work on making menus automatically adjust<br>
> to the screen size. I didn't finish and thought it too risky anyway,<br>
> but the patch is here:<br>
> <a href="https://bitbucket.org/rbv/ohrrpgce/commits/c6628f9345067f211228ef6ac3e79e10cc2fa952?at=master" rel="noreferrer" target="_blank">https://bitbucket.org/rbv/ohrrpgce/commits/c6628f9345067f211228ef6ac3e79e10cc2fa952?at=master</a><br>
> I wanted to affect both standardmenu and MenuDef menus, but at the<br>
> time was most concerned with the latter. My approach was to calculate<br>
> the appropriate .size in init_menu_state, and to set MenuState.spacing<br>
> in standardmenu like draw_menu already does, but I realised that won't<br>
> support resizing the menu as the window size changes, so I have had to<br>
> change the approacht anyway.<br>
</span>*would have had to change the approach anyway<br>
<div class="HOEnZb"><div class="h5"><br>
> It turns out that MenuDef menus cope really badly with changes not<br>
> just window size but to basic settings! They use a default .size of 17<br>
> and ignore .itemspacing and the border size. Fixing that is the most<br>
> interesting part of my patch.<br>
><br>
> On 7 April 2016 at 07:45,  <<a href="mailto:subversion@hamsterrepublic.com">subversion@hamsterrepublic.com</a>> wrote:<br>
>> james<br>
>> 2016-04-06 12:45:05 -0700 (Wed, 06 Apr 2016)<br>
>> 241<br>
>> Add .autosize_vertical member to MenuState. It defaults to OFF<br>
>> but if it is set = ON and .spacing is set correctly, calls to<br>
>> usemenu will automatically adjust .size to fit the current vertical<br>
>> screen size<br>
>><br>
>> (tested on the map selection menu)<br>
>> ---<br>
>> U   wip/mapsubs.bas<br>
>> U   wip/menus.bas<br>
>> U   wip/<a href="http://menus.bi" rel="noreferrer" target="_blank">menus.bi</a><br>
>> U   wip/<a href="http://udts.bi" rel="noreferrer" target="_blank">udts.bi</a><br>
>> _______________________________________________<br>
>> Ohrrpgce mailing list<br>
>> <a href="mailto:ohrrpgce@lists.motherhamster.org">ohrrpgce@lists.motherhamster.org</a><br>
>> <a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
_______________________________________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</div></div></blockquote></div><br></div>