More stuff with new menu engine
This commit is contained in:
parent
5251c6249a
commit
0ff545900f
|
@ -4415,3 +4415,10 @@
|
||||||
of TIMER will automatically execute every X amount of seconds, which is
|
of TIMER will automatically execute every X amount of seconds, which is
|
||||||
defined per menu command. This combined with all of the other new
|
defined per menu command. This combined with all of the other new
|
||||||
features makes for an amazingly powerful new menu system!
|
features makes for an amazingly powerful new menu system!
|
||||||
|
|
||||||
|
+ Increased the menu reading buffer to 4k, up from 2k
|
||||||
|
|
||||||
|
+ Added new menu command -I which sets the menu timer counter to the value
|
||||||
|
in the optional data field. The menu timer is an internal incrementing
|
||||||
|
counter used to fire off TIMER commands. It represents the number of
|
||||||
|
seconds that have passed since the menu was loaded.
|
||||||
|
|
|
@ -30,7 +30,7 @@ Type
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Const
|
Const
|
||||||
Num_Cmds = 96;
|
Num_Cmds = 97;
|
||||||
MenuCmds : Array[1..Num_Cmds] of CmdRec = (
|
MenuCmds : Array[1..Num_Cmds] of CmdRec = (
|
||||||
// AUTOSIG MENU COMMANDS
|
// AUTOSIG MENU COMMANDS
|
||||||
( Name: 'AE'; Desc: 'Autosig editor' ),
|
( Name: 'AE'; Desc: 'Autosig editor' ),
|
||||||
|
@ -136,6 +136,7 @@ Const
|
||||||
// OTHER MENU COMMANDS
|
// OTHER MENU COMMANDS
|
||||||
( Name: '-D'; Desc: 'Set access flags (set 2)' ),
|
( Name: '-D'; Desc: 'Set access flags (set 2)' ),
|
||||||
( Name: '-F'; Desc: 'Set access flags (set 1)' ),
|
( Name: '-F'; Desc: 'Set access flags (set 1)' ),
|
||||||
|
( Name: '-I'; Desc: 'Set menu timer to <data>' ),
|
||||||
( Name: '-K'; Desc: 'Add keys to input buffer' ),
|
( Name: '-K'; Desc: 'Add keys to input buffer' ),
|
||||||
( Name: '-N'; Desc: 'Ask Yes/No (default No)' ),
|
( Name: '-N'; Desc: 'Ask Yes/No (default No)' ),
|
||||||
( Name: '-P'; Desc: 'Prompt for a password' ),
|
( Name: '-P'; Desc: 'Prompt for a password' ),
|
||||||
|
|
|
@ -77,9 +77,9 @@ Begin
|
||||||
Box := TAnsiMenuBox.Create;
|
Box := TAnsiMenuBox.Create;
|
||||||
Form := TAnsiMenuForm.Create;
|
Form := TAnsiMenuForm.Create;
|
||||||
|
|
||||||
Box.Open (5, 5, 75, 18);
|
Box.Open (5, 5, 75, 17);
|
||||||
|
|
||||||
VerticalLine (24, 7, 16);
|
VerticalLine (24, 7, 15);
|
||||||
VerticalLine (67, 7, 12);
|
VerticalLine (67, 7, 12);
|
||||||
|
|
||||||
Form.AddStr ('B', ' BBS Name', 14, 7, 26, 7, 10, 25, 30, @Config.BBSName, Topic);
|
Form.AddStr ('B', ' BBS Name', 14, 7, 26, 7, 10, 25, 30, @Config.BBSName, Topic);
|
||||||
|
@ -89,9 +89,8 @@ Begin
|
||||||
Form.AddStr ('O', ' Sysop ACS', 13, 11, 26, 11, 11, 25, 30, @Config.ACSSysop, Topic);
|
Form.AddStr ('O', ' Sysop ACS', 13, 11, 26, 11, 11, 25, 30, @Config.ACSSysop, Topic);
|
||||||
Form.AddStr ('F', ' Feedback To', 11, 12, 26, 12, 13, 25, 30, @Config.FeedbackTo, Topic);
|
Form.AddStr ('F', ' Feedback To', 11, 12, 26, 12, 13, 25, 30, @Config.FeedbackTo, Topic);
|
||||||
Form.AddStr ('A', ' Start Menu', 12, 13, 26, 13, 12, 20, 20, @Config.DefStartMenu, Topic);
|
Form.AddStr ('A', ' Start Menu', 12, 13, 26, 13, 12, 20, 20, @Config.DefStartMenu, Topic);
|
||||||
Form.AddStr ('C', ' Fallback Menu', 9, 14, 26, 14, 15, 20, 20, @Config.DefFallMenu, Topic);
|
Form.AddStr ('H', ' Theme', 17, 14, 26, 14, 7, 20, 20, @Config.DefThemeFile, Topic);
|
||||||
Form.AddStr ('H', ' Theme', 17, 15, 26, 15, 7, 20, 20, @Config.DefThemeFile, Topic);
|
Form.AddTog ('E', ' Terminal', 14, 15, 26, 15, 10, 10, 0, 3, 'Ask Detect Detect/Ask ANSI', @Config.DefTermMode, Topic);
|
||||||
Form.AddTog ('E', ' Terminal', 14, 16, 26, 16, 10, 10, 0, 3, 'Ask Detect Detect/Ask ANSI', @Config.DefTermMode, Topic);
|
|
||||||
|
|
||||||
Form.AddBol ('L', ' Chat Logging', 53, 7, 69, 7, 14, 3, @Config.ChatLogging, Topic);
|
Form.AddBol ('L', ' Chat Logging', 53, 7, 69, 7, 14, 3, @Config.ChatLogging, Topic);
|
||||||
Form.AddByte ('R', ' Hours Start', 54, 8, 69, 8, 13, 2, 0, 24, @Config.ChatStart, Topic);
|
Form.AddByte ('R', ' Hours Start', 54, 8, 69, 8, 13, 2, 0, 24, @Config.ChatStart, Topic);
|
||||||
|
|
|
@ -136,6 +136,7 @@ Begin
|
||||||
'-' : Case Cmd[2] of
|
'-' : Case Cmd[2] of
|
||||||
'D' : ToggleAccessFlags(CmdData, Session.User.ThisUser.AF2);
|
'D' : ToggleAccessFlags(CmdData, Session.User.ThisUser.AF2);
|
||||||
'F' : ToggleAccessFlags(CmdData, Session.User.ThisUser.AF1);
|
'F' : ToggleAccessFlags(CmdData, Session.User.ThisUser.AF1);
|
||||||
|
'I' : TimerCount := strS2I(CmdData);
|
||||||
'N' : Session.User.AcsOkFlag := Session.io.GetYN(CmdData, False);
|
'N' : Session.User.AcsOkFlag := Session.io.GetYN(CmdData, False);
|
||||||
'P' : Session.User.AcsOkFlag := Session.io.GetPW(Copy(CmdData, 1, Pos(';', CmdData) - 1), Session.GetPrompt(417),
|
'P' : Session.User.AcsOkFlag := Session.io.GetPW(Copy(CmdData, 1, Pos(';', CmdData) - 1), Session.GetPrompt(417),
|
||||||
strUpper(Copy(CmdData, Pos(';', CmdData) + 1, Length(CmdData))));
|
strUpper(Copy(CmdData, Pos(';', CmdData) + 1, Length(CmdData))));
|
||||||
|
@ -416,7 +417,7 @@ Begin
|
||||||
4 : Format := 19;
|
4 : Format := 19;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
If Data.Info.Header <> '' Then
|
// If Data.Info.Header <> '' Then
|
||||||
TBBSCore(Owner).io.OutFullLn (Data.Info.Header);
|
TBBSCore(Owner).io.OutFullLn (Data.Info.Header);
|
||||||
|
|
||||||
Listed := 0;
|
Listed := 0;
|
||||||
|
@ -444,6 +445,9 @@ Begin
|
||||||
Else
|
Else
|
||||||
TBBSCore(Owner).io.OutFull(strPadR(Data.Item[Count]^.Text, Format + Length(Data.Item[Count]^.Text) - strMCILen(Data.Item[Count]^.Text), ' '));
|
TBBSCore(Owner).io.OutFull(strPadR(Data.Item[Count]^.Text, Format + Length(Data.Item[Count]^.Text) - strMCILen(Data.Item[Count]^.Text), ' '));
|
||||||
|
|
||||||
|
While Screen.CursorX < Format Do
|
||||||
|
Session.io.BufAddChar(' ');
|
||||||
|
|
||||||
If Listed MOD Data.Info.DispCols = 0 Then
|
If Listed MOD Data.Info.DispCols = 0 Then
|
||||||
TBBSCore(Owner).io.OutFullLn ('');
|
TBBSCore(Owner).io.OutFullLn ('');
|
||||||
End;
|
End;
|
||||||
|
@ -553,6 +557,7 @@ Begin
|
||||||
|
|
||||||
Repeat
|
Repeat
|
||||||
Inc (Count);
|
Inc (Count);
|
||||||
|
|
||||||
Found := Data.Item[Count]^.HotKey = Temp + UpCase(Ch);
|
Found := Data.Item[Count]^.HotKey = Temp + UpCase(Ch);
|
||||||
Until Found or (Count >= Data.NumItems);
|
Until Found or (Count >= Data.NumItems);
|
||||||
|
|
||||||
|
@ -638,10 +643,9 @@ Var
|
||||||
Else
|
Else
|
||||||
Offset := Length(TempStr);
|
Offset := Length(TempStr);
|
||||||
|
|
||||||
TBBSCore(Owner).io.BufFlush;
|
TBBSCore(Owner).io.BufAddStr (#27 + '[s');
|
||||||
TBBSCore(Owner).io.BufAddStr(#27 + '[s');
|
TBBSCore(Owner).io.AnsiGotoXY (PromptX + Offset, PromptY);
|
||||||
TBBSCore(Owner).io.AnsiGotoXY(PromptX + Offset, PromptY);
|
TBBSCore(Owner).io.AnsiColor (PromptA);
|
||||||
TBBSCore(Owner).io.AnsiColor(PromptA);
|
|
||||||
|
|
||||||
If Ch = #08 Then
|
If Ch = #08 Then
|
||||||
Str := Str + #8#32#8
|
Str := Str + #8#32#8
|
||||||
|
@ -684,7 +688,7 @@ Begin
|
||||||
If ReDraw Then Begin
|
If ReDraw Then Begin
|
||||||
ShowMenu;
|
ShowMenu;
|
||||||
|
|
||||||
If Data.Info.Header <> '' Then
|
// If Data.Info.Header <> '' Then
|
||||||
TBBSCore(Owner).io.OutFullLn(Data.Info.Header);
|
TBBSCore(Owner).io.OutFullLn(Data.Info.Header);
|
||||||
|
|
||||||
If Data.Info.Footer <> '' Then
|
If Data.Info.Footer <> '' Then
|
||||||
|
@ -918,7 +922,7 @@ Procedure TMenuEngine.ExecuteMenu (Load, Forced, View, Action: Boolean);
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
If TimerCount = 100000 Then TimerCount := 0;
|
If TimerCount = 1000000000 Then TimerCount := 0;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
|
|
|
@ -950,8 +950,7 @@ Begin
|
||||||
{If either handles or realnames are toggled off, fill the gaps}
|
{If either handles or realnames are toggled off, fill the gaps}
|
||||||
|
|
||||||
Session.Menu.MenuName := 'newinfo';
|
Session.Menu.MenuName := 'newinfo';
|
||||||
|
Session.Menu.ExecuteMenu (True, False, False, True);
|
||||||
Session.Menu.ExecuteMenu (False, False, False, True);
|
|
||||||
|
|
||||||
Session.io.OutFullLn (Session.GetPrompt(21));
|
Session.io.OutFullLn (Session.GetPrompt(21));
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ Type
|
||||||
FeedbackTo : String[30];
|
FeedbackTo : String[30];
|
||||||
Inactivity : Word; // Inactivity seconds (0=disabled)
|
Inactivity : Word; // Inactivity seconds (0=disabled)
|
||||||
DefStartMenu : String[20]; // Default start menu
|
DefStartMenu : String[20]; // Default start menu
|
||||||
DefFallMenu : String[20];
|
UNUSED : String[20];
|
||||||
DefThemeFile : String[20];
|
DefThemeFile : String[20];
|
||||||
DefTermMode : Byte; // 0=ask 1=detect 2=detect/ask 3=ansi
|
DefTermMode : Byte; // 0=ask 1=detect 2=detect/ask 3=ansi
|
||||||
DefScreenSize : Byte;
|
DefScreenSize : Byte;
|
||||||
|
@ -340,6 +340,12 @@ Type
|
||||||
Reserved : Array[1..389] of Byte;
|
Reserved : Array[1..389] of Byte;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
// day of week
|
||||||
|
// sema file
|
||||||
|
// event type [bbs exit/bbs exec/mis event]
|
||||||
|
// execcmd
|
||||||
|
// remove offhook
|
||||||
|
|
||||||
EventRec = Record { EVENTS.DAT }
|
EventRec = Record { EVENTS.DAT }
|
||||||
Active : Boolean; { Is event active? }
|
Active : Boolean; { Is event active? }
|
||||||
Name : String[30]; { Event Name }
|
Name : String[30]; { Event Name }
|
||||||
|
|
Loading…
Reference in New Issue