nanogui-experiments/README.md

1.8 KiB

NanoGUI Experiments

NanoGUI Knobs example app

Quickstart

python3 -m venv venv
source venv/bin/activate
(venv) pip install -r requirenments.txt
(venv) python3 nanogui_helloworld.py

Knobs Example

(venv) python3 nanogui_knob.py

Key and Mouse Bindings

Mouse click-and-drag knob coarse in-/decrement +/- one 100th / pixel
Shift + mouse click-and-drag knob fine in-/decrement +/- 0.1 / pixel
Mouse wheel scroll over knob coarse in-/decrement one 100th / click * 2.0
Shift + mouse wheel scroll over knob fine in-/decrement +/- 0.1 / click
Mouse wheel scroll over value entry fine in-/decrement +/- 0.1
Ctrl + left click on knob set to default value
Up/down key while mouse over knob coarse in-/decrement +/- one 100th
Shift + up/down key while mouse over knob fine in-/decrement +/- 0.1
Page up/down key while mouse over knob fine in-/decrement +/- one 10th
Mouse click on value entry up/down arrow fine in-/decrement +/- 0.1
Return/Enter while editing value entry accept & set value
Escape key quit

Notes

  • No support for scaling or re-layouting on window resize yet.
  • Only the knob value gauge color can currently be specified on instantation, the knob gradient and outline colors are currently hard-coded.