Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW-FEATURE] - Allow dynamic assignment to WIDGET_LIST activePosition and auto-refresh on change #293

Open
ivanao92 opened this issue Jan 9, 2025 · 1 comment
Labels
feature-request Add new feature to the library

Comments

@ivanao92
Copy link

ivanao92 commented Jan 9, 2025

Is your feature request related to a problem?

Is it possible to refresh the activePosition value dynamically at runtime?

Describe the solution you'd like?

For example, consider a menu with a WIDGET_LIST containing multiple options. If one of these options is updated programmatically from another function in the code, it would be helpful to have a way to reflect this change in the activePosition immediately.

This functionality would enhance flexibility, especially for scenarios where menu updates occur automatically based on external triggers or logic.

Maybe using poll() or something like that?

Describe alternatives you've considered

No response

Additional context

No response

@ivanao92 ivanao92 added the feature-request Add new feature to the library label Jan 9, 2025
@tst-Me
Copy link

tst-Me commented Jan 11, 2025

Hi there.

Intro:

Just recognized itemValue and poll only exist for about a week and have been confused why my WidgetBool and WidgetRange won't update when starting/initial value is already a variable in my code.

So far:

Recreated both now in a local copy of the library and was able to make the "values" changeable in a maybe unsafe way, by just deleting their const and referencing the value. Similar to @forntoh 's approach in ItemValue.
But I was not able to get poll doing its job on widgets, seems to be only related to items.

So, my suggestions for a possible solution:

-> make "polling" available to widgets too

or more sophisticated

-> make it possible to add a passing argument for poll globally

greetings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Add new feature to the library
Projects
None yet
Development

No branches or pull requests

2 participants