Multiuser Bug Fixes

Implemented missing features that could be
seen as bugs for the casual users.

Such as sync of the main checklist. And other
minor changes.
This commit is contained in:
Jeison Yehuda Amihud (Blender Dumbass) 2021-01-04 15:52:29 +00:00
parent dac36b7db7
commit 162d3f8038
4 changed files with 59 additions and 14 deletions

View file

@ -467,7 +467,8 @@ def draw(outlayer, win, path, back="story_editor"):
if "schedule_task_selected" not in win.current:
win.current["schedule_task_selected"] = False
if win.current["schedule_task_selected"] and win.cur == win.current["schedule_task_selected"][-1]:
if win.current["schedule_task_selected"] and win.cur == win.current["schedule_task_selected"][-1]\
or win.current["schedule_task_selected"] and win.cur == "/set" and win.current["schedule_task_selected"][-1] == "":
csl = win.current["schedule_task_selected"][0][0][4]
@ -761,7 +762,7 @@ def draw(outlayer, win, path, back="story_editor"):
win.checklists = {}
win.assets = {}
win.multiuser["last_request"] = ""
#win.analytics = analytics.load(win.project)
win.analytics = analytics.load(win.project)
UI_elements.roundrect(layer, win,
sx,

View file

@ -195,7 +195,7 @@ def draw(outlayer, win):
new_date_format = "%Y/%m/%d"
today = datetime.datetime.strftime(datetime.datetime.today(), new_date_format)
if not win.cur:
if win.cur == "/set" :
UI_elements.text(outlayer, win, "current_date_setting",
width-100-(width-6*40),
15,
@ -257,7 +257,7 @@ def draw(outlayer, win):
for date in dates:
if not win.cur and date != win.current["date"]:
if (not win.cur or win.cur == "/set" )and date != win.current["date"]:
continue
theday = date
@ -281,7 +281,7 @@ def draw(outlayer, win):
name = win.cur[win.cur.rfind("/")+1:]
acur = ""
if win.cur not in item and win.cur:
if win.cur not in item and win.cur != "/set":
continue
@ -312,7 +312,7 @@ def draw(outlayer, win):
# ICON
if i == "scenes" and not win.cur:
if i == "scenes" and win.cur == "/set":
if item.count("/") > 1:
@ -324,7 +324,7 @@ def draw(outlayer, win):
UI_elements.image(layer, win,
"settings/themes/"+win.settings["Theme"]+"/icons/scene.png",
5, win.scroll["history"] + current_Y+5, 40, 40)
elif i == "assets" and not win.cur:
elif i == "assets" and win.cur == "/set":
if os.path.exists(os.getcwd()+"/settings/themes/"+win.settings["Theme"]+"/icons/"+acur+".png"):
@ -350,7 +350,7 @@ def draw(outlayer, win):
50,
win.scroll["history"] + current_Y+30,
)
if not win.cur:
if win.cur == "/set":
if "chr" not in item and "veh" not in item and "loc" not in item and "obj" not in item and "set" not in item:
layer.show_text(item.replace("/","",1).replace("/", " | "))
else:

View file

@ -274,7 +274,7 @@ def draw(outlayer, win):
continue
for item in schedules[date]:
if win.cur in item or not win.cur:
if win.cur in item or not win.cur or win.cur == "/set":
slist.append([date, item, schedules[date][item]])
@ -497,7 +497,7 @@ def draw(outlayer, win):
if acur in ["chr", "veh", "loc", "obj"]:
assetname = talk.text(acur)+": "+name
else:
assetname = entry[1]
assetname = entry[1].replace("/set", "")
layer.set_font_size(15)
layer.move_to(
@ -550,7 +550,7 @@ def draw(outlayer, win):
# to it. But first let's check that's it's infect an asset.
# because...
if entry[1]:
if entry[1] and entry[1] != "/set":
goto = "script"
itemtype = "scenes"
@ -649,6 +649,50 @@ def draw(outlayer, win):
current_Y = current_Y + 50
# Multiuser now gave a way to give who ever does the assingments
# a tool to select the name from a drop down menu. Rather then
# type it by hand. I will still have the ability to type. What
# if that someone is not logged in currently.
if win.textactive == "schedule_username_setting":
# So when you clicked to edit a drop down menu will appear.
for user in win.multiuser["users"]:
# It's going to be simple buttons with user icons and
# the username.
def do():
thing[0][-1] = win.multiuser["users"][user]["username"]
analytics.save(win.project, win.analytics)
win.text["schedule_username_setting"]["text"] = thing[0][-1]
win.textactive = ""
# Multiuser sycning
win.multiuser["request"] = "analytics"
UI_elements.roundrect(layer, win,
80,
win.scroll["schedule"] + current_Y+5,
width-80,
40,
10,
button=do,
icon="user",
tip=win.multiuser["users"][user]["username"],
offset=[x,y])
UI_color.set(layer, win, "text_normal")
layer.set_font_size(20)
layer.move_to(
130,
win.scroll["schedule"] + current_Y+30,
)
layer.show_text(win.multiuser["users"][user]["username"])
current_Y = current_Y + 50
# DATE : TIME
UI_elements.image(layer, win,

View file

@ -73,7 +73,7 @@ def layer(win):
# Hude analytics button on the top
def do():
win.cur = ""
win.cur = "/set"
win.url = "analytics"
@ -147,7 +147,7 @@ def layer(win):
slist = []
for date in schedules:
for item in schedules[date]:
if win.cur == item or not win.cur:
if win.cur == item or not win.cur == "/set":
slist.append([date, item, schedules[date][item]])
@ -203,7 +203,7 @@ def layer(win):
# ASSINGING TEXT VALUES
taskname = thing[0][4][-1]
taskurl = fullurl
taskcur = assetname
taskcur = assetname.replace("/set","")
# AND A TINY BUTTON TO ENTER WHAT EVER YOU ARE DOING
goto = "analytics"