Skip this if not interested in script menus.
Scripts don't do menu's very well and the existing
solutions (dialog program and others) are not easy
to use. I'm thinking about writting a menu program
that would be so simple an example would be enought
for most programmers.
A script menu is needed for AsmIDE and the library
now has most of the code needed. It may be faster
than studying the diaglog program again and again.
What if.. we simply used an editor to put text were
we wanted buttons and let a program build the buttons?
We would need some way to tell the script a button was
pressed and identify the button.
If the button text was the end of a script
file it will be ignored if the shell. Well,
we would have to put a "exit" command in the
script to keep it from finding our button text,
but that's not a problem.
We could assume the buttons form a grid and identify
each button with coordinates. With coordinates the
button locations and return codes are obvious just by
looking at a picture of the buttons (text). Both the
script and button display program can find the grid
structure and don't need to pass any parameters to associate
a button with a specific code.
OK, the only problem left is to make sure the grid does
not contain irregular buttons or huge buttons that make
things confusing. This can be solved by making all buttons
the same size. Having everything the same size is a
limitation, but if we allow buttons to be optional in
a grid position it is still possible to make some interesting
menus.
So, can this be written easily and quickly in assembler?
Decoding a text button with multiple lines of text can be
difficult. Then, there is the problem of adjusting button
positions and determining window size.
I'll give this project a go, and see what happens.
all the best, jeff