diff --git a/mystic/HISTORY.txt b/mystic/HISTORY.txt index 88e08a5..72f22e9 100644 --- a/mystic/HISTORY.txt +++ b/mystic/HISTORY.txt @@ -4415,3 +4415,10 @@ of TIMER will automatically execute every X amount of seconds, which is defined per menu command. This combined with all of the other new 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. diff --git a/mystic/bbs_cfg_menuedit.pas b/mystic/bbs_cfg_menuedit.pas index beca089..bc7f8d6 100644 --- a/mystic/bbs_cfg_menuedit.pas +++ b/mystic/bbs_cfg_menuedit.pas @@ -30,7 +30,7 @@ Type End; Const - Num_Cmds = 96; + Num_Cmds = 97; MenuCmds : Array[1..Num_Cmds] of CmdRec = ( // AUTOSIG MENU COMMANDS ( Name: 'AE'; Desc: 'Autosig editor' ), @@ -136,6 +136,7 @@ Const // OTHER MENU COMMANDS ( Name: '-D'; Desc: 'Set access flags (set 2)' ), ( Name: '-F'; Desc: 'Set access flags (set 1)' ), + ( Name: '-I'; Desc: 'Set menu timer to ' ), ( Name: '-K'; Desc: 'Add keys to input buffer' ), ( Name: '-N'; Desc: 'Ask Yes/No (default No)' ), ( Name: '-P'; Desc: 'Prompt for a password' ), diff --git a/mystic/bbs_cfg_syscfg.pas b/mystic/bbs_cfg_syscfg.pas index c654080..bdcda34 100644 --- a/mystic/bbs_cfg_syscfg.pas +++ b/mystic/bbs_cfg_syscfg.pas @@ -77,9 +77,9 @@ Begin Box := TAnsiMenuBox.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); 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 ('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 ('C', ' Fallback Menu', 9, 14, 26, 14, 15, 20, 20, @Config.DefFallMenu, Topic); - Form.AddStr ('H', ' Theme', 17, 15, 26, 15, 7, 20, 20, @Config.DefThemeFile, Topic); - Form.AddTog ('E', ' Terminal', 14, 16, 26, 16, 10, 10, 0, 3, 'Ask Detect Detect/Ask ANSI', @Config.DefTermMode, Topic); + Form.AddStr ('H', ' Theme', 17, 14, 26, 14, 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.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); diff --git a/mystic/bbs_menus.pas b/mystic/bbs_menus.pas index e9d438f..ffbc445 100644 --- a/mystic/bbs_menus.pas +++ b/mystic/bbs_menus.pas @@ -136,6 +136,7 @@ Begin '-' : Case Cmd[2] of 'D' : ToggleAccessFlags(CmdData, Session.User.ThisUser.AF2); 'F' : ToggleAccessFlags(CmdData, Session.User.ThisUser.AF1); + 'I' : TimerCount := strS2I(CmdData); '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), strUpper(Copy(CmdData, Pos(';', CmdData) + 1, Length(CmdData)))); @@ -416,7 +417,7 @@ Begin 4 : Format := 19; End; - If Data.Info.Header <> '' Then +// If Data.Info.Header <> '' Then TBBSCore(Owner).io.OutFullLn (Data.Info.Header); Listed := 0; @@ -444,6 +445,9 @@ Begin Else 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 TBBSCore(Owner).io.OutFullLn (''); End; @@ -553,6 +557,7 @@ Begin Repeat Inc (Count); + Found := Data.Item[Count]^.HotKey = Temp + UpCase(Ch); Until Found or (Count >= Data.NumItems); @@ -638,10 +643,9 @@ Var Else Offset := Length(TempStr); - TBBSCore(Owner).io.BufFlush; - TBBSCore(Owner).io.BufAddStr(#27 + '[s'); - TBBSCore(Owner).io.AnsiGotoXY(PromptX + Offset, PromptY); - TBBSCore(Owner).io.AnsiColor(PromptA); + TBBSCore(Owner).io.BufAddStr (#27 + '[s'); + TBBSCore(Owner).io.AnsiGotoXY (PromptX + Offset, PromptY); + TBBSCore(Owner).io.AnsiColor (PromptA); If Ch = #08 Then Str := Str + #8#32#8 @@ -684,7 +688,7 @@ Begin If ReDraw Then Begin ShowMenu; - If Data.Info.Header <> '' Then +// If Data.Info.Header <> '' Then TBBSCore(Owner).io.OutFullLn(Data.Info.Header); If Data.Info.Footer <> '' Then @@ -918,7 +922,7 @@ Procedure TMenuEngine.ExecuteMenu (Load, Forced, View, Action: Boolean); End; End; - If TimerCount = 100000 Then TimerCount := 0; + If TimerCount = 1000000000 Then TimerCount := 0; End; Var diff --git a/mystic/bbs_user.pas b/mystic/bbs_user.pas index 3b9f9b2..f5152f0 100644 --- a/mystic/bbs_user.pas +++ b/mystic/bbs_user.pas @@ -950,8 +950,7 @@ Begin {If either handles or realnames are toggled off, fill the gaps} Session.Menu.MenuName := 'newinfo'; - - Session.Menu.ExecuteMenu (False, False, False, True); + Session.Menu.ExecuteMenu (True, False, False, True); Session.io.OutFullLn (Session.GetPrompt(21)); diff --git a/mystic/records.pas b/mystic/records.pas index 3f06462..0051658 100644 --- a/mystic/records.pas +++ b/mystic/records.pas @@ -106,7 +106,7 @@ Type FeedbackTo : String[30]; Inactivity : Word; // Inactivity seconds (0=disabled) DefStartMenu : String[20]; // Default start menu - DefFallMenu : String[20]; + UNUSED : String[20]; DefThemeFile : String[20]; DefTermMode : Byte; // 0=ask 1=detect 2=detect/ask 3=ansi DefScreenSize : Byte; @@ -340,6 +340,12 @@ Type Reserved : Array[1..389] of Byte; End; + // day of week + // sema file + // event type [bbs exit/bbs exec/mis event] + // execcmd + // remove offhook + EventRec = Record { EVENTS.DAT } Active : Boolean; { Is event active? } Name : String[30]; { Event Name }