Menu tree programming?

Place code snippets and demo code here
Post Reply
User avatar
Basicboy
Posts: 178
Joined: Sat Jul 20, 2024 11:42 am
Location: Australia
Has thanked: 56 times
Been thanked: 13 times

Menu tree programming?

Post by Basicboy »

I wonder if anyone here has released code for menu tree to be displayed on lcd where user can navigate through menus, submenues, choose settings and toggle selections...etc

If not, please let me know. I think this is something that I can do and I may invest a few hours to write it and release code here.
I love this community!
User avatar
Basicboy
Posts: 178
Joined: Sat Jul 20, 2024 11:42 am
Location: Australia
Has thanked: 56 times
Been thanked: 13 times

Re: Menu tree programming?

Post by Basicboy »

Further to this, is there a way to "store" basic commands as data and then execute them?

I understand my request is vague so I'll clarify:

Imagine we're building a menu for a game settings and a submenu is for "lives"

It will look like so:
Lives:
3
5
7

I want to store all these lines as data outside of the menu engine to offer maximum versatility, furthermore, I want to store the commands as data. Ie:

Choice$(1) = "3"
Choice$(2) = "5"
Choice$(3) = "7"

I also want to store the commands as data, but is that possible?

Ie

Todoif(1) = "lives = 3"

Then do something like

Execute(todoif(1))

Which will do exactly like

Lives = 3

I have used assembly and this can certainly be done in it, but I don't think you can do this in basic. Still, i thought I'd check with you because if possible it will make writing a menu engine very simple. Thanks
I love this community!
User avatar
PeterN
Posts: 641
Joined: Mon Feb 08, 2021 7:56 pm
Location: Krefeld, Germany
Has thanked: 296 times
Been thanked: 357 times
Contact:

Re: Menu tree programming?

Post by PeterN »

Hi Basicboy

take a look at [Local Link Removed for Guests]

(didn‘t you look for an incubator? : [Local Link Removed for Guests] )
User avatar
Electroguard
Posts: 1094
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 373 times
Been thanked: 392 times

Re: Menu tree programming?

Post by Electroguard »

User avatar
Starraker
Posts: 29
Joined: Tue Sep 03, 2024 1:53 am
Location: Canberra Australia
Been thanked: 7 times
Contact:

Re: Menu tree programming?

Post by Starraker »

Basic Boy,

I am currently in the process of doing this with a TFT on a ESP32-3248S035C with voice over pictorial backgrounds and icon presentation for the selections but have run into a few glitches but hopefully I am not far away. The hardware is also offering some challenges but I have just about solved all of those now - just a pull up resistor here and there and few more wires. When I finish I plan to publish the project.

How is yours going?

I also love this community and language
Post Reply