mirror of
https://git.checksum.fail/alec/Web.git
synced 2026-05-26 19:15:49 +00:00
Add @popup_get_str
This commit is contained in:
+21
@@ -11,4 +11,25 @@ U0 @task_doc_pop() {
|
||||
Fs->display_doc = pop_doc->parent_doc;
|
||||
Fs->put_doc = pop_doc->parent_doc;
|
||||
DocDel(pop_doc);
|
||||
}
|
||||
|
||||
U8 @popup_get_str_task(U8 *prompt) {
|
||||
DocClear;
|
||||
"\n";
|
||||
"\dFG,0\d %s\dFD\d", prompt;
|
||||
GetStr;
|
||||
}
|
||||
|
||||
U8 @popup_get_str(U8 *title, U8 *prompt) {
|
||||
CTask *p = User("Fs->user_data = @popup_get_str_task(0x%08x);\n", prompt);
|
||||
while (!p->user_data) {
|
||||
StrCpy(p->task_title, title);
|
||||
p->win_top = 20;
|
||||
p->win_bottom = p->win_top + 2;
|
||||
p->put_doc->desc = NULL;
|
||||
Sleep(1);
|
||||
}
|
||||
U8 *res = StrNew(p->user_data);
|
||||
Kill(p);
|
||||
return res;
|
||||
}
|
||||
Reference in New Issue
Block a user