diff options
author | Ben Connors <benconnors@outlook.com> | 2019-01-24 21:14:02 -0500 |
---|---|---|
committer | Ben Connors <benconnors@outlook.com> | 2019-01-24 21:14:02 -0500 |
commit | 9b3230d72efc51a504edf102090c219e9dd35f99 (patch) | |
tree | 0c6ecfc4c26afda25eda66d5ccdceaf929ebf4d2 /tk.py | |
parent | fff5e34c9864532b5e38e70b658eccb0ff35d1d3 (diff) |
Move stuff around; fix rendering
- Now actually able to render shows
- Maybe able to render chasers
- Add untested OLA lighting output
- General fixes
Diffstat (limited to 'tk.py')
-rwxr-xr-x | tk.py | 32 |
1 files changed, 0 insertions, 32 deletions
@@ -1,32 +0,0 @@ -#!/usr/bin/env python3 - -"""Module containing Tk widgets for BLC.""" - -from tkinter import Frame, N, E, S, W, VERTICAL -from tkinter.ttk import Label, Scale - -class DMXView(Frame): - """Class for viewing DMX values.""" - def update_vals(self, vals:tuple): - """Update the current values. - - Parameters: - vals: a tuple of (channel, value) pairs. values must be integers from 0 to 255, - inclusive. - """ - for c,v in vals: - self.channels[c-1-self.offset].set(255-v) - - def __init__(self, master, count=36, offset=0): - super().__init__(master) - - self.channels = [] - self.offset = 0 - self.rowconfigure(0,weight=1) - for c in range(count): - self.columnconfigure(c,weight=1) - s = Scale(self, from_=0, to=255, orient=VERTICAL, length=300) - s.grid(row=0, column=c, sticky=N+E+S+W) - s.set(255) - Label(self, text=str(c+1+offset)).grid(row=1, column=c,sticky=N+E+S+W) - self.channels.append(s) |