bugfic
This commit is contained in:
parent
7dea373f13
commit
c5bed1d5a1
@ -1,7 +1,7 @@
|
|||||||
from ahserver.serverenv import ServerEnv
|
from ahserver.serverenv import ServerEnv
|
||||||
|
|
||||||
def UiConform(title="请确认",message="请确认", binds=[]):
|
def UiConform(title="请确认",message="请确认", binds=[], **kw):
|
||||||
return {
|
dic = {
|
||||||
"widgettype":"Conform",
|
"widgettype":"Conform",
|
||||||
"options":{
|
"options":{
|
||||||
"width":"50%",
|
"width":"50%",
|
||||||
@ -13,8 +13,11 @@ def UiConform(title="请确认",message="请确认", binds=[]):
|
|||||||
},
|
},
|
||||||
binds:json.dump(binds, indent=4, ensure_ascii=False)
|
binds:json.dump(binds, indent=4, ensure_ascii=False)
|
||||||
}
|
}
|
||||||
|
if kw:
|
||||||
|
dic.update(kw)
|
||||||
|
return dic
|
||||||
|
|
||||||
def UiWindow(title, icon, content, cheight=10, cwidth=15):
|
def UiWindow(title, icon, content, cheight=10, cwidth=15, **kw):
|
||||||
return {
|
return {
|
||||||
"widgettype":"PopupWindow",
|
"widgettype":"PopupWindow",
|
||||||
"options":{
|
"options":{
|
||||||
@ -28,6 +31,9 @@ def UiWindow(title, icon, content, cheight=10, cwidth=15):
|
|||||||
"auto_open":True
|
"auto_open":True
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if kw:
|
||||||
|
dic.update(kw)
|
||||||
|
return dic
|
||||||
|
|
||||||
def UiError(title="出错", message="出错啦", timeout=5, **kw):
|
def UiError(title="出错", message="出错啦", timeout=5, **kw):
|
||||||
dic = {
|
dic = {
|
||||||
@ -40,7 +46,9 @@ def UiError(title="出错", message="出错啦", timeout=5, **kw):
|
|||||||
"title":title,
|
"title":title,
|
||||||
"message":message
|
"message":message
|
||||||
}
|
}
|
||||||
}.update(kw)
|
}
|
||||||
|
if kw:
|
||||||
|
dic.update(kw)
|
||||||
return dic
|
return dic
|
||||||
|
|
||||||
def UiMessage(title="消息", message="后台消息", timeout=5, **kw):
|
def UiMessage(title="消息", message="后台消息", timeout=5, **kw):
|
||||||
@ -54,7 +62,9 @@ def UiMessage(title="消息", message="后台消息", timeout=5, **kw):
|
|||||||
"title":title,
|
"title":title,
|
||||||
"message":message
|
"message":message
|
||||||
}
|
}
|
||||||
}.update(kw)
|
}
|
||||||
|
if kw:
|
||||||
|
dic.update(kw)
|
||||||
return dic
|
return dic
|
||||||
|
|
||||||
def load_pybricks():
|
def load_pybricks():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user