aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrb_tk.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/srb_tk.py b/srb_tk.py
index 7f64e87..58b83f2 100755
--- a/srb_tk.py
+++ b/srb_tk.py
@@ -53,6 +53,15 @@ SPDX-License-Identifier: GPL-3.0-only
Icon courtesy of https://icons8.com/icon/9336/aircraft
"""
+# muted colors for backgrounds of levels within a levelset whose balloon is this color.
+colors = {
+ "blue": 0xccffff,
+ "green": 0xccff99,
+ "red": 0xffcccc,
+ "orange": 0xffcc99,
+ "yellow": 0xffff99,
+}
+
def get_srb_image(filename, sizex, sizey, resample=Image.Resampling.LANCZOS, photoImage = True):
""" helper function that returns an ImageTk from the named file from the configured images directory, resized for you. """
global IMAGE_FAILURES
@@ -296,6 +305,7 @@ class App(tk.Frame):
self.lbl_levelsets.append(tk.Label(self.frm_levels,text=tl["name"]))
self.lbl_levelsets[i].grid(row=x,column=0,sticky="EW",columnspan=2)
if "c" in tl and tl["c"] != "none":
+ tk.Label(self.frm_levels,background="#" + hex(colors[tl["c"]])[2:]).grid(row=x,column=0,rowspan=tl["l"],columnspan=17,sticky="NESW")
tk.Label(self.frm_levels,image=self.img_balloons[-1]).grid(row=x,column=2,columnspan=2)
self.spn_levelsets.append(stk.Spinbox(self.frm_levels,textvariable=self.levelset_status_ints[i],from_=0,to=tl["l"],width=2))
self.spn_levelsets[i].grid(row=x+1,column=0)
bgstack15