diff options
Diffstat (limited to 'srb_tk.py')
-rwxr-xr-x | srb_tk.py | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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) |