johanberntsson / PunyInform

A fast and compact library for writing text adventure games for the Z-machine running on 8-bit computers as well as other platforms.
MIT License
176 stars 17 forks source link

The title of the help menu is not centered in the window #96

Closed auraes closed 2 years ago

auraes commented 2 years ago

I tried with the test file of PunyInform: test-parser.inf, and the Lectrote and frotz(Linux) interpreter. menu-min

johanberntsson commented 2 years ago

This is a bug in ext_menu.h. We will fix it, thanks for the report

fredrikr commented 2 years ago

This happens because we have diverged from the (broken) behaviour described in DM3 and currently implemented in the standard library, where item_width should be set to half the width of the item name. In November 2020 we changed this in ext_menu.h so the programmer should set the full item width instead. The test file used the standard library behaviour.

We have now added an option to ext_menu - define the constant EXT_MENU_STDLIB_MOD to make it behave like the standard library. This may come in handy when writing a game that should be compilable with either PunyInform or the standard library.