aboutsummaryrefslogtreecommitdiff
path: root/boltzgas/visualizer.py
diff options
context:
space:
mode:
authorAdrian Kummerlaender2020-03-27 21:00:00 +0100
committerAdrian Kummerlaender2020-03-27 21:00:52 +0100
commit1d0639e33296f4cdc6f635732202ef05c2c6f81a (patch)
tree711fc90828d10a69f45aa38455dc51457608ee94 /boltzgas/visualizer.py
parent774a4e4d6298f03ff61fb6e2c13a62ca25a2afb2 (diff)
downloadboltzgas-1d0639e33296f4cdc6f635732202ef05c2c6f81a.tar
boltzgas-1d0639e33296f4cdc6f635732202ef05c2c6f81a.tar.gz
boltzgas-1d0639e33296f4cdc6f635732202ef05c2c6f81a.tar.bz2
boltzgas-1d0639e33296f4cdc6f635732202ef05c2c6f81a.tar.lz
boltzgas-1d0639e33296f4cdc6f635732202ef05c2c6f81a.tar.xz
boltzgas-1d0639e33296f4cdc6f635732202ef05c2c6f81a.tar.zst
boltzgas-1d0639e33296f4cdc6f635732202ef05c2c6f81a.zip
Start tidying up new features
Diffstat (limited to 'boltzgas/visualizer.py')
-rw-r--r--boltzgas/visualizer.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/boltzgas/visualizer.py b/boltzgas/visualizer.py
index 373a181..22ebfe1 100644
--- a/boltzgas/visualizer.py
+++ b/boltzgas/visualizer.py
@@ -64,8 +64,10 @@ def make_keyboard_handler(controller, view):
controller.pause()
else:
controller.run()
- if key == b'h':
- view.show_histogram = not view.show_histogram
+ if key == b'1':
+ view.show_decorations = not view.show_decorations
+ if key == b'2':
+ view.show_windows = not view.show_windows
return on_keyboard
@@ -75,7 +77,7 @@ def make_close_handler(controller):
return on_close
-def simulate(config, gas, instruments, decorations, windows, updates_per_frame = 5):
+def simulate(config, gas, instruments, updates_per_frame = 5):
glutInit()
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH)
glutInitWindowPosition(0, 0)
@@ -85,7 +87,7 @@ def simulate(config, gas, instruments, decorations, windows, updates_per_frame =
for instrument in instruments:
instrument.setup()
- view = View(gas, decorations, windows)
+ view = View(gas, instruments)
controller = SimulationController(gas, instruments, updates_per_frame)
glutDisplayFunc(make_display_handler(controller, view))