Conversation
|
Suggestion from gm: change the input from the terminal to the glvis window. e.g. by typing |
|
@justinlaughlin , if you mean what I was saying, it was about streams. That could be done now 💨 . In console, I think it is ok to ask the user interactively, but you may support both 😉 . Like asking the user for the code, but when left empty (there should be a hint 😇 ), it will ask for the options interactively. In the window, it makes sense to me only when we add the popup window/overlay 🤔 . |
|
besides that, I would prefer C-style formatting flags like in printf. 👍 |
I think the prompts on the terminal are much better than expecting (even experts in GLVis) to remember what keys they need to press (after the initial key, which I assume is already documented in the output from pressing |
|
Thanks for the help explaining some of the glvis internals @v-dobrev! I added the option to change via stream and glvis script. |
| - <kbd>Alt</kbd> + <kbd>a</kbd> – Set axes number format | ||
| - <kbd>Alt</kbd> + <kbd>c</kbd> – Set colorbar number format |
There was a problem hiding this comment.
What does Alt mean on Mac? Is it option or command -- it will be good to clarify it here.
There was a problem hiding this comment.
For what's it worth, we do use Alt already in https://github.com/glvis/glvis/?tab=readme-ov-file#advanced
There was a problem hiding this comment.
I'm not able to test but I did see other places that used Alt like Tzanio mentioned. It'd probably be good to mention it somewhere at the top.
v-dobrev
left a comment
There was a problem hiding this comment.
I did not test it, but the changes look good to me.
|
@justinlaughlin, were you able to try #288 (comment)? @v-dobrev, can you share your alternative fix? |
@tzanio It looks like |
SDL event loop. Added some comments to clarify behavior.
|
@justinlaughlin, @tzanio, I created a PR (#294) towards this PR with my proposed changes in the key events handling. Take a look and try it. |
Excellent! I just tried this and it is working. |
|
Number formatting: fix key events handling
|
@v-dobrev, should we mention the |
It is something internal, so I'm not sure it is important to mention it there. |
|
This PR need a new baseline screenshot for one test --
Does this sound ok? |
GLVis/glvis#288 that correctly interprets digit keys in input key sequences.
|
I did 1 and 2 from the above list. Waiting on tests to see if there are any issues. |
Yes |
|
Tests pass :). Can we merge? It'd probably be simpler to merge this prior to merging #285 since that PR has different baselines. |
|
Go ahead and merge @justinlaughlin. |
I don't have the power to 😅 |
try again |
|
@justinlaughlin , the merge does not pass on |
Addressing #260 by adding the ability to specify number formats for the colorbar and axes.
Keybind for colorbar is
Alt+cand for axes isAlt+a. Once pressed, you can specify precision, format (default,fixed, orscientific), and whether the positive sign is always shown or not.This PR also adds
prompt()inaux_vis.hppwhich is a more general function for requesting user input. A default value can be specified (I think implementation could be cleaner withstd::optional) as well as a validator lambda.ex9.saveddefaultsex9.savedusing(1, 'f', true)for colorbar and(0, 'f', false)for axes.