From 72b7704a4b45f2ba774509b91607924fe037aa9c Mon Sep 17 00:00:00 2001
From: nightfox <>
Date: Mon, 26 Mar 2018 01:41:02 +0000
Subject: [PATCH] Version 0.36 Beta: For non-lightbar voting, updated to use
 BallotHdr (791) instead of SelectHdr (501).

---
 xtrn/SlyVote/SlyVote.js | 24 ++++++++++++++++++++----
 xtrn/SlyVote/readme.txt |  8 ++++----
 2 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/xtrn/SlyVote/SlyVote.js b/xtrn/SlyVote/SlyVote.js
index 3aa6b8b4a0..b66b7462e3 100644
--- a/xtrn/SlyVote/SlyVote.js
+++ b/xtrn/SlyVote/SlyVote.js
@@ -105,6 +105,9 @@
  *                              Made a fix for non-lightbar voting input - It wasn't
  *                              accepting Q to quit out of voting (a blank input worked
  *                              though).
+ * 2018-03-25 Eric Oulashin     Version 0.36 Beta
+ *                              For non-lightbar voting, updated to use BallotHdr (791)
+ *                              instead of SelectHdr (501).
  */
 
 load("sbbsdefs.js");
@@ -156,8 +159,8 @@ load("smbdefs.js");
 var gAvatar = load({}, "avatar_lib.js");
 
 // Version information
-var SLYVOTE_VERSION = "0.35 Beta";
-var SLYVOTE_DATE = "2018-03-19";
+var SLYVOTE_VERSION = "0.36 Beta";
+var SLYVOTE_DATE = "2018-03-25";
 
 // Determine the script's startup directory.
 // This code is a trick that was created by Deuce, suggested by Rob Swindell
@@ -1539,7 +1542,7 @@ function VoteOnPoll(pSubBoardCode, pMsgbase, pMsgHdr, pUser, pUserVoteNumber, pR
 			if (typeof(pUserVoteNumber) != "number")
 			{
 				console.clear("\1n");
-				var selectHdr = bbs.text(SelectItemHdr);
+				var selectHdr = bbs.text(BallotHdr);
 				printf("\1n" + selectHdr + "\1n", pMsgHdr.subject);
 				var optionFormatStr = "\1n\1c\1h%2d\1n\1c: \1h%s\1n";
 				var optionNum = 1;
@@ -2010,7 +2013,9 @@ function ViewVoteResults(pSubBoardCode)
 			else if (scrollRetObj.lastKeypress == gReaderKeys.vote)
 			{
 				// Let the user vote on the poll in interactive mode (this uses
-				// traditional style interaction rather than usinga lightbar).
+				// traditional style interaction rather than using a lightbar).
+				// TODO: Change this to use the lightbar menu at some point?
+				// Using the traditional voting interface:
 				var voteRetObj = VoteOnPoll(pSubBoardCode, msgbase, pollMsgHdrs[currentMsgIdx], user, null, true);
 				drawKeyHelpLine = true;
 				// If the user's vote was saved, then update the message header so that it includes
@@ -2042,6 +2047,17 @@ function ViewVoteResults(pSubBoardCode)
 					drawMsg = true;
 					drawKeyHelpLine = false;
 				}
+				// Lightbar voting:
+				/*
+				console.clear("\n");
+				var listTopRow = 2;
+				var drawColRetObj = DrawVoteColumns(listTopRow);
+				var startCol = drawColRetObj.columnX1+drawColRetObj.colWidth-1;
+				var menuHeight = gBottomBorderRow-listTopRow;
+				var voteRetObj = DisplayPollOptionsAndVote(gSubBoardCode, pollMsgHdrs[currentMsgIdx].number, startCol, listTopRow, drawColRetObj.textLen, menuHeight);
+				if (voteRetObj.errorMsg.length > 0)
+					DisplayErrorWithPause(voteRetObj.errorMsg, gMessageRow, voteRetObj.mnemonicsRequiredForErrorMsg);
+				*/
 			}
 			else if (scrollRetObj.lastKeypress == gReaderKeys.close)
 			{
diff --git a/xtrn/SlyVote/readme.txt b/xtrn/SlyVote/readme.txt
index 65c592ec2a..ba095ab655 100644
--- a/xtrn/SlyVote/readme.txt
+++ b/xtrn/SlyVote/readme.txt
@@ -1,6 +1,6 @@
                                    SlyVote
-                                 Version 0.35 Beta
-                           Release date: 2018-03-19
+                                 Version 0.36 Beta
+                           Release date: 2018-03-25
 
                                      by
 
@@ -229,10 +229,10 @@ For sysops, polls can be deleted when viewing results from SlyVote.
 SlyVote uses the following lines from Synchronet's text.dat file (located in
 the sbbs/ctrl directory):
 120 (CantPostOnSub)
-501 (SelectItemHdr)
 503 (SelectItemWhich)
 759 (CantReadSub)
 779 (VotingNotAllowed)
 780 (VotedAlready)
 781 (R_Voting)
-787 (PollVoteNotice)
\ No newline at end of file
+787 (PollVoteNotice)
+791 (BallotHdr)
\ No newline at end of file
-- 
GitLab