Comments (6)
I also noticed this issue. Can you make a pull request of your fix @DarioMaechler?
from liquidmenu.
Can you make a pull request of your fix @DarioMaechler?
I turned it into pull request #39 It can be installed into platformio until this is released (or fixed differently) using:
lib_deps =
LiquidMenu=https://github.com/thijstriemstra/LiquidMenu/archive/patch-1.zip
Can you review the pull request @VaSe7u?
from liquidmenu.
Hello, @DarioMaechler and @thijstriemstra.
This is intended by design for the purely aesthetic purpose of not showing the focus indicator when it's not used.
However you are not the first people to find this behavior confusing, so I might add an option to enable/disable it.
Thank's for the input.
from liquidmenu.
Thanks for the feedback.
This is intended by design for the purely aesthetic purpose
I see. I think the default should not be the aesthetic version since it's confusing IMO, I thought my code/board was buggy. An option sounds good though.
from liquidmenu.
Thanks to both of you as well.
I agree with @thijstriemstra. Based on the method names and the comments in the declaration I find the behavior confusing as well. Small example illustrating the problem:
-
execute switch_focus(true) until get_focusedLine() == _lineCount. Works fine so far (the focus just isn't visible).
-
execute set_focusedLine(get_focusedLine()) --> this will return false and not work
In my logic the getter returns an illegal value if the setter for the same item won't accept that same value.
from liquidmenu.
Hello and sorry for the delay.
I thought about it and I agree that hiding the indicator while iterating the focusable lines really is confusing and this is not an intuitive place to put that functionality in.
I decided to make this side effect compile time configurable though a define inside src/LiquidMenu_config.h:
https://github.com/VaSe7u/LiquidMenu/blob/5978667585b9ea3cbdfcff5316bcb5b89fd10215/src/LiquidMenu_config.h#L83
It defaults to enabled in order to keep backwards compatibility.
Thank you for the input and the help with the code modification needed.
from liquidmenu.
Related Issues (20)
- call_function() calls update() for previous menu if change_menu() is in the callback function
- API reference is 404 HOT 2
- Unable to get current menu from LiquidSystem
- 'recognizeType(int&)' is ambiguous HOT 1
- LiquidMenu objects have to be defined globally HOT 3
- Screens could link to child menus HOT 5
- Switching screens should reset focus item back to first line HOT 2
- Can't compile I2C example HOT 8
- Rotary encoder example HOT 2
- Blink cursor over editing position HOT 1
- Avoid creating duplicate variables HOT 1
- `delete_variable()` and `detach_function()` HOT 2
- `LiquidSystem::is_callable` makes an undesired `LiquidMenu::call_function` HOT 1
- Mixing sub-menus and scrolling lines? HOT 1
- Switch focus disappears for one step after an iteration HOT 4
- Support for the SAMD architecture HOT 1
- Optional screen refresh option when calling a function HOT 1
- [Poll] Which interface do you use to interface with the display?
- LiquidCrystal not found even if it's installed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liquidmenu.