Просмотр исходного кода

feat(xtintin): 增加交互式删除触发功能

dzp 2 лет назад
Родитель
Сommit
3b4697c5cf
1 измененных файлов с 18 добавлено и 10 удалено
  1. 18 10
      plugins/lib/xtintin/cmds.tin

+ 18 - 10
plugins/lib/xtintin/cmds.tin

@@ -67,10 +67,11 @@ PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp <danzipao@gmail.com>) 
     #loop {1} {&info[TICKERS][]} {index} {
         #local uval {};
         #math uval $info[TICKERS][+$index][arg3] * 1000000;
+        #local name {$info[TICKERS][+$index][arg1]};
 
         #echo {   %-30s %+20s %+10s %+20m}
             {@genModuleLink{$info[TICKERS][+$index][class];MOD}}
-            {$info[TICKERS][+$index][arg1]}
+            {$name @mslp.Exec{{xtt.delTrigger tick $name};<110>✗<060>;false}}
             {$info[TICKERS][+$index][arg3]}
             {($uval - ($utime - $info[TICKERS][+$index][arg4]) % $uval) / 1000000.00};
     };
@@ -114,10 +115,10 @@ PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp <danzipao@gmail.com>) 
         #list {aliasTable[$class]} sort {$name};
     };
 
-    #local format {    %-30s %-30s %-10s};
+    #local format {    %-30s %-40s %-10s};
     #echo {<128>$format} {class} {别名} {类型};
 
-    #draw Yellow scroll line 1 1 1 80;
+    #draw Yellow scroll line 1 1 1 90;
 
     #local classList {@list.Sort{*aliasTable[]}};
     #local class {};
@@ -157,7 +158,7 @@ PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp <danzipao@gmail.com>) 
 
             #echo {<060>$format}
                 {@genModuleLink{$class;MOD}<060>}
-                {@linkToHelp{$class;$name}}
+                {@mslp.Exec{{xtt.delTrigger alias $name};<110>✗<060>;false} @linkToHelp{$class;$name}}
                 {$type};
         };
     };
@@ -202,10 +203,10 @@ PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp <danzipao@gmail.com>) 
         };
     };
 
-    #local format {    %-30s %-30s %-10s %s};
+    #local format {    %-30s %-40s %-10s %s};
     #echo {<128>$format} {class} {变量} {类型} {值};
 
-    #draw Yellow scroll line 1 1 1 80;
+    #draw Yellow scroll line 1 1 1 95;
 
     #local classList {@slist.Sort{*varTable[]}};
     #local class {};
@@ -224,13 +225,20 @@ PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp <danzipao@gmail.com>) 
 
             #echo {<060>$format}
                 {@genModuleLink{$class;MOD}<060>}
-                {@linkToHelp{$class;$name}}
+                {@mslp.Exec{{xtt.delTrigger var $name};<110>✗<060>;false} @linkToHelp{$class;$name}}
                 {$type}
                 {$value};
         };
     };
 };
 
+#alias {xtt.delTrigger} {
+    #local type     {%1};
+    #local trigger  {%2};
+    #local cmd {#un$type $trigger};
+    $cmd;
+};
+
 ///=== {
 // ## xtt.ListFunc [<正则表达式>]
 //    列出系统中符合条件的函数,如果省略条件则列出所有函数。
@@ -269,10 +277,10 @@ PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp <danzipao@gmail.com>) 
         #list {funcsTable[$class]} sort {$name};
     };
 
-    #local format {    %-30s %-30s %-10s};
+    #local format {    %-30s %-40s %-10s};
     #echo {<128>$format} {class} {函数} {类型};
 
-    #draw Yellow scroll line 1 1 1 80;
+    #draw Yellow scroll line 1 1 1 90;
 
     #local classList {@list.Sort{*funcsTable[]}};
     #local class {};
@@ -299,7 +307,7 @@ PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp <danzipao@gmail.com>) 
 
             #echo {<060>$format}
                 {@genModuleLink{$class;MOD}<060>}
-                {@linkToHelp{$class;$name}}
+                {@mslp.Exec{{xtt.delTrigger func $name};<110>✗<060>;false} @linkToHelp{$class;$name}}
                 {$type};
         };
     };