From ac660021689774402cbcb3b1115eeaf28b33a85f Mon Sep 17 00:00:00 2001 From: nightfox <> Date: Sun, 21 Jan 2018 02:28:28 +0000 Subject: [PATCH] Version 1.17 beta 54: Added a new configuration option, rightJustifyAvatars, which can be used to specify whether to right-justify avatars. Valid values are true and false (false means left-justify). --- xtrn/DDMsgReader/DDMsgReader.cfg | 2 ++ xtrn/DDMsgReader/DDMsgReader.js | 12 +++++++++--- xtrn/DDMsgReader/readme.txt | 8 ++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/xtrn/DDMsgReader/DDMsgReader.cfg b/xtrn/DDMsgReader/DDMsgReader.cfg index 44a2452956..030858168f 100644 --- a/xtrn/DDMsgReader/DDMsgReader.cfg +++ b/xtrn/DDMsgReader/DDMsgReader.cfg @@ -38,6 +38,8 @@ areaChooserHdrMaxLines=6 ; Whether or not to display user avatars in the message header displayAvatars=true +; Whether or not to right-justify avatars. False means left-justify. +rightJustifyAvatars=true ; The theme file name (for colors, strings, etc.) themeFilename=DefaultTheme.cfg \ No newline at end of file diff --git a/xtrn/DDMsgReader/DDMsgReader.js b/xtrn/DDMsgReader/DDMsgReader.js index 8c5825a6c7..1f1f3cb2d7 100644 --- a/xtrn/DDMsgReader/DDMsgReader.js +++ b/xtrn/DDMsgReader/DDMsgReader.js @@ -93,6 +93,8 @@ * Added support for displaying user avatars, recently * added to Synchronet. Added the configuration option * displayAvatars to toggle this feature. + * 2018-01-20 Eric Oulashin Version 1.17 beta 54 + * Added a configuration file option, rightJustifyAvatars. */ // TODO: Add a command for closing a poll (only available to the user who opened the @@ -179,8 +181,8 @@ if (system.version_num < 31500) } // Reader version information -var READER_VERSION = "1.17 Beta 53"; -var READER_DATE = "2018-01-12"; +var READER_VERSION = "1.17 Beta 54"; +var READER_DATE = "2018-01-20"; // Keyboard key codes for displaying on the screen var UP_ARROW = ascii(24); @@ -954,6 +956,7 @@ function DigDistMsgReader(pSubBoardCode, pScriptArgs) // Whether or not to display avatars this.displayAvatars = true; + this.rightJustifyAvatar = true; this.cfgFilename = "DDMsgReader.cfg"; // Check the command-line arguments for a custom configuration file name @@ -7369,6 +7372,8 @@ function DigDistMsgReader_ReadConfigFile() } else if (settingUpper == "DISPLAYAVATARS") this.displayAvatars = (valueUpper == "TRUE"); + else if (settingUpper == "RIGHTJUSTIFYAVATARS") + this.rightJustifyAvatar = (valueUpper == "TRUE"); } } @@ -9341,7 +9346,8 @@ function DigDistMsgReader_DisplayEnhancedMsgHdr(pMsgHdr, pDisplayMsgNum, pStartS if (this.displayAvatars && (gAvatar != null) && ((pMsgHdr.attr & MSG_ANONYMOUS) == 0)) { console.gotoxy(1, screenY-1); - gAvatar.draw(pMsgHdr.from_ext, pMsgHdr.from, pMsgHdr.from_net_addr, /* above: */true, /* right-justified: */true); + //gAvatar.draw(pMsgHdr.from_ext, pMsgHdr.from, pMsgHdr.from_net_addr, /* above: */true, /* right-justified: */true); + gAvatar.draw(pMsgHdr.from_ext, pMsgHdr.from, pMsgHdr.from_net_addr, /* above: */true, /* right-justified: */this.rightJustifyAvatar); console.attributes = 0; // Clear the background attribute as the next line might scroll, filling with BG attribute // If using the traditional (non-scrolling) user interface, then // put the cursor where it should be. (If using the scrolling diff --git a/xtrn/DDMsgReader/readme.txt b/xtrn/DDMsgReader/readme.txt index 88efa745ee..ec303104a7 100644 --- a/xtrn/DDMsgReader/readme.txt +++ b/xtrn/DDMsgReader/readme.txt @@ -1,6 +1,6 @@ Digital Distortion Message Reader - Version 1.17 beta 53 - Release date: 2018-01-12 + Version 1.17 beta 54 + Release date: 2018-01-20 by @@ -657,6 +657,10 @@ displayAvatars Whether or not to display user avatars in message headers. Valid values are true and false. +rightJustifyAvatars Whether or not to right-justify avatars. + Valid values are true and false. Flase + means to left-justify avatars. + themeFilename The name of the configuration file to use for colors & string settings -- GitLab