Upload files to 'project_manager'

This commit is contained in:
Jeison Yehuda Amihud (Blender Dumbass) 2021-12-19 18:16:05 +00:00
parent 1920944a5d
commit 73c8326d38
2 changed files with 55 additions and 7 deletions

View file

@ -95,6 +95,7 @@ def run():
win.blink = False
t2 = threading.Thread(target=update_reader.get_update_info, args=(win,))
t2.setDaemon(True)
t2.start()
if not settings.read("Username"):
@ -205,20 +206,35 @@ def pmdrawing(pmdrawing, main_layer, win):
# Current frame (for animations and things like this)
win.current["frame"] += 1
# Getting data about the frame
win.current['mx'] = win.get_pointer()[0]
win.current['my'] = win.get_pointer()[1]
win.current['w'] = win.get_size()[0]
win.current['h'] = win.get_size()[1]
# Scaling of the UI
if not "scale" in win.settings:
settings.write("scale", 1) # Writing to file
win.settings = settings.load_all()
# Getting data about the frame
win.current['mx'] = int(round(win.get_pointer()[0] / win.settings["scale"]))
win.current['my'] = int(round(win.get_pointer()[1] / win.settings["scale"]))
win.current['w'] = int(round(win.get_size()[0] / win.settings["scale"] ))
win.current['h'] = int(round(win.get_size()[1] / win.settings["scale"] ))
if 65451 in win.current["keys"]:
settings.write("scale", win.settings["scale"]+0.2)
win.settings = settings.load_all()
win.current["keys"] = []
elif 65453 in win.current["keys"]:
settings.write("scale", win.settings["scale"]-0.2)
win.settings = settings.load_all()
win.current["keys"] = []
#Background color
UI_color.set(main_layer, win, "background")
main_layer.rectangle(
0,
0,
win.current['w'],
win.current['h'])
win.current['w']*win.settings["scale"],
win.current['h']*win.settings["scale"])
main_layer.fill()
# Tooltips and other junk has to be defined here. And then drawn later to
@ -277,6 +293,10 @@ def pmdrawing(pmdrawing, main_layer, win):
Layers.append([UI_testing.layer(win)])
Layers.append([win.tooltip_surface])
if win.settings["scale"] != 1:
main_layer.scale(win.settings["scale"],
win.settings["scale"])
# Combining layers
for layer in Layers:
if len(layer) > 1:

View file

@ -332,6 +332,34 @@ def layer(win):
current_Y + win.scroll["pm_settings"] + 135)
layer.show_text(talk.text("Auto_De-Blur"))
current_Y += 50
# Pixelated Blur
ablur_ok = "unchecked"
if win.settings["PixelBlur"]:
ablur_ok = "checked"
def do():
win.settings["PixelBlur"] = not win.settings["PixelBlur"]
settings.write("PixelBlur", win.settings["PixelBlur"])
UI_elements.roundrect(layer, win,
win.current["w"]/2-240,
110 + current_Y + win.scroll["pm_settings"],
450,
40,
10,
button=do,
icon=ablur_ok,
tip=talk.text("PixelBlur"))
UI_color.set(layer, win, "text_normal")
layer.set_font_size(20)
layer.move_to(win.current["w"]/2-180,
current_Y + win.scroll["pm_settings"] + 135)
layer.show_text(talk.text("PixelBlur"))
current_Y += 50