TempleOSCD_150216.ISO
This commit is contained in:
1 parent
64f679eeb9
commit
401601816c
531 files changed
+23341
-22071
No files matched your search
+86
-6
@@ -1,3 +1,72 @@
|
||||
CTask *tour_put,*tour_task;
|
||||
Bool tour_okay_pressed;
|
||||
|
||||
U0 TourPutTask()
|
||||
{
|
||||
CDoc *doc;
|
||||
I64 ch;
|
||||
DocTermNew;
|
||||
WinHorz(TEXT_COLS/2,TEXT_COLS-2);
|
||||
WinVert(TEXT_ROWS/2+5,TEXT_ROWS-7);
|
||||
LBts(&Fs->display_flags,DISPLAYf_WIN_ON_TOP);
|
||||
WinToTop;
|
||||
Fs->text_attr=Fs->border_attr=LTGRAY<<4+BLUE;
|
||||
Fs->border_src=BDS_CONST;
|
||||
Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_BORDER-WIF_SELF_IP_L-WIF_SELF_IP_R-WIG_DBL_CLICK;
|
||||
doc=DocPut;
|
||||
doc->flags|=DOCF_FORM;
|
||||
DocCursor(FALSE,doc);
|
||||
"$$WW+H,1$$";
|
||||
while (TRUE) {
|
||||
WinMgrSync;
|
||||
if (ScanMsg(&ch,,1<<MSG_KEY_DOWN) && (ch==CH_ESC||ch==CH_SHIFT_ESC)) {
|
||||
Kill(tour_task->parent_task,FALSE);
|
||||
break;
|
||||
}
|
||||
DocLock(doc);
|
||||
if (ch==CH_SPACE && doc->cur_entry!=doc) {
|
||||
if (doc->cur_entry->de_flags & DOCEF_LINK)
|
||||
'' CH_SPACE;
|
||||
else if (doc->cur_entry->type_u8==DOCT_BUTTON)
|
||||
tour_okay_pressed=TRUE;
|
||||
}
|
||||
DocUnlock(doc);
|
||||
if (tour_okay_pressed) {
|
||||
Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_BORDER-WIF_SELF_IP_L-WIF_SELF_IP_R-WIG_DBL_CLICK;
|
||||
if (sys_focus_task==Fs)
|
||||
WinRefocus;
|
||||
} else {
|
||||
Fs->win_inhibit=0;
|
||||
WinFocus;
|
||||
}
|
||||
}
|
||||
tour_put=NULL;
|
||||
}
|
||||
|
||||
U0 TourPut(U8 *st,Bool wait_okay=FALSE)
|
||||
{
|
||||
CDoc *doc;
|
||||
CTask *old_focus_task;
|
||||
if (TaskValidate(tour_put)) {
|
||||
doc=DocPut(tour_put);
|
||||
DocClear(doc);
|
||||
DocPrint(doc,"%s",st);
|
||||
if (!wait_okay)
|
||||
tour_okay_pressed=TRUE;
|
||||
else {
|
||||
DocPrint(doc,"\n\n$$CM-RE+CX,LE=-2$$$$BT,\"Okay\",LM=\"b\"$$\n\n");
|
||||
DocFormBwd(doc);
|
||||
old_focus_task=sys_focus_task;
|
||||
tour_okay_pressed=FALSE;
|
||||
do WinMgrSync;
|
||||
while (!tour_okay_pressed);
|
||||
WinFocus(old_focus_task);
|
||||
DocClear(doc);
|
||||
}
|
||||
} else
|
||||
ThrowBreak(tour_task);
|
||||
}
|
||||
|
||||
public I64 PopUpTourPart()
|
||||
{
|
||||
I64 i;
|
||||
@@ -7,16 +76,16 @@ public I64 PopUpTourPart()
|
||||
"$$CM+LX,4,4$$$$BT,\"Part 2: Editing and running programs\",LE=2$$"
|
||||
"$$CM+LX,4,4$$$$BT,\"Part 3: Adding macros to PersonalMenu\",LE=3$$"
|
||||
"$$CM+LX,4,4$$$$BT,\"Part 4: Choose filename, choose dir\",LE=4$$"
|
||||
"$$CM+LX,4,4$$$$BT,\"Part 5: WordStat\",LE=5$$"
|
||||
"$$CM+LX,4,4$$$$BT,\"Part 6: Search (Grep)\",LE=6$$"
|
||||
"$$CM+LX,4,4$$$$BT,\"Part 7: TempleOS File masks\",LE=7$$"
|
||||
"$$CM+LX,4,4$$$$BT,\"Part 5: AutoComplete\",LE=5$$"
|
||||
"$$CM+LX,4,4$$$$BT,\"Part 6: Search (Find)\",LE=6$$"
|
||||
"$$CM+LX,4,4$$$$BT,\"Part 7: TempleOS file masks\",LE=7$$"
|
||||
"$$CM+LX,4,4$$$$BT,\"Part 8: Editor filter\",LE=8$$"
|
||||
"$$CM+LX,4,4$$$$BT,\"Part 9: Debugging\",LE=9$$"
|
||||
"$$CM+LX,4,4$$$$BT,\"Part 10: Wow!!\",LE=10$$"
|
||||
"$$CM+LX,4,4$$$$BT,\"Part 11: Test Suite\",LE=11$$"
|
||||
"$$CM+LX,4,4$$$$BT,\"Done\",LE=DOCM_CANCEL$$\n");
|
||||
doc->flags|=DOCF_FORM;
|
||||
i=SrvUser("WinMax;DocMenuDo(0x%X,0);",doc);
|
||||
i=PopUpPrint("WinMax;DocMenuDo(0x%X,0);",doc);
|
||||
DocDel(doc);
|
||||
return i;
|
||||
}
|
||||
@@ -25,18 +94,29 @@ U0 TourMenu()
|
||||
{
|
||||
U8 buf[128];
|
||||
I64 i;
|
||||
tour_task=Fs;
|
||||
tour_okay_pressed=TRUE;
|
||||
tour_put=Spawn(&TourPutTask,NULL,"TourPut",,Fs);
|
||||
TaskWait(tour_put);
|
||||
while (TRUE) {
|
||||
Cd(__DIR__);
|
||||
AutoComplete;
|
||||
if (LBtr(&tour_put->display_flags,DISPLAYf_SHOW))
|
||||
WinZBufUpdate;
|
||||
i=PopUpTourPart;
|
||||
if (i>0) {
|
||||
StrPrint(buf,"::/Misc/Tour/Tour%X.AUT",i);
|
||||
if (!LBts(&tour_put->display_flags,DISPLAYf_SHOW))
|
||||
WinZBufUpdate;
|
||||
StrPrint(buf,"Tour%X.AUT",i);
|
||||
ExeFile(buf);
|
||||
} else
|
||||
break;
|
||||
}
|
||||
Kill(tour_put);
|
||||
}
|
||||
|
||||
"DocClear;WinMax;\n";
|
||||
WinMgrSync(2);
|
||||
TourMenu;
|
||||
Msg(MSG_KEY_DOWN,0,SC_CURSOR_DOWN|SCF_CTRL);
|
||||
"Cd(\"HOME\");Dir;\n";
|
||||
"Cd(\"::/Home\");Dir;\n";
|
||||
Reference in new issue
Block a user