bugfix
This commit is contained in:
parent
39bf9847b6
commit
7dea373f13
@ -15,46 +15,46 @@ def UiConform(title="请确认",message="请确认", binds=[]):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def UiWindow(title, icon, content, cheight=10, cwidth=15):
|
def UiWindow(title, icon, content, cheight=10, cwidth=15):
|
||||||
return {
|
return {
|
||||||
"widgettype":"PopupWindow",
|
"widgettype":"PopupWindow",
|
||||||
"options":{
|
"options":{
|
||||||
"author":"cc",
|
"author":"cc",
|
||||||
"cwidth":cwidth,
|
"cwidth":cwidth,
|
||||||
"cheight":cheight,
|
"cheight":cheight,
|
||||||
"title":title,
|
"title":title,
|
||||||
"content":content,
|
"content":content,
|
||||||
"icon":icon or entire_url('/bricks/imgs/app.png'),
|
"icon":icon or entire_url('/bricks/imgs/app.png'),
|
||||||
"movable":True,
|
"movable":True,
|
||||||
"auto_open":True
|
"auto_open":True
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def UiError(title="出错", message="出错啦", timeout=5, **kw):
|
def UiError(title="出错", message="出错啦", timeout=5, **kw):
|
||||||
dic = {
|
dic = {
|
||||||
"widgettype":"Error",
|
"widgettype":"Error",
|
||||||
"options":{
|
"options":{
|
||||||
"author":"tr",
|
"author":"tr",
|
||||||
"timeout":timeout,
|
"timeout":timeout,
|
||||||
"cwidth":15,
|
"cwidth":15,
|
||||||
"cheight":10,
|
"cheight":10,
|
||||||
"title":title,
|
"title":title,
|
||||||
"message":message
|
"message":message
|
||||||
}
|
}
|
||||||
}.update(kw)
|
}.update(kw)
|
||||||
return dic
|
return dic
|
||||||
|
|
||||||
def UiMessage(title="消息", message="后台消息", timeout=5, **kw):
|
def UiMessage(title="消息", message="后台消息", timeout=5, **kw):
|
||||||
dic = {
|
dic = {
|
||||||
"widgettype":"Message",
|
"widgettype":"Message",
|
||||||
"options":{
|
"options":{
|
||||||
"author":"tr",
|
"author":"tr",
|
||||||
"timeout":timeout,
|
"timeout":timeout,
|
||||||
"cwidth":15,
|
"cwidth":15,
|
||||||
"cheight":10,
|
"cheight":10,
|
||||||
"title":title,
|
"title":title,
|
||||||
"message":message
|
"message":message
|
||||||
}
|
}
|
||||||
}.update(kw)
|
}.update(kw)
|
||||||
return dic
|
return dic
|
||||||
|
|
||||||
def load_pybricks():
|
def load_pybricks():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user