From a2c3c4c3d8d7d8ff16143f91dd93517f92b5745c Mon Sep 17 00:00:00 2001 From: Michael Danilov Date: Tue, 12 Jan 2021 21:17:56 +0100 Subject: [PATCH] Add option to move chat to the left and align left. --- Nasal/screen.nas | 13 +++++++++++-- defaults.xml | 1 + gui/dialogs/view.xml | 9 +++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Nasal/screen.nas b/Nasal/screen.nas index 9a5eddb79..7e2231155 100644 --- a/Nasal/screen.nas +++ b/Nasal/screen.nas @@ -549,7 +549,11 @@ _setlistener("/sim/signals/nasal-dir-initialized", func { #-- Init ----------------------------------------------------------------------- -property_display = display.new(5, -25); +if (getprop("/sim/chat-on-the-left")) { + property_display = display.new(5, -250); +} else { + property_display = display.new(5, -25); +} listener.display = setlistener("/sim/gui/dialogs/property-browser/selected", func(n) { var n = n.getValue(); if (n != "" and getprop("/devices/status/keyboard/shift")) { @@ -567,7 +571,12 @@ setlistener("/sim/gui/current-style", func { theme_font = getprop("/sim/gui/selected-style/fonts/message-display/name"); }, 1); -log = window.new(nil, -30, 10, 10); +if (getprop("/sim/chat-on-the-left")) { + log = window.new(5, -30, 10, 10); + log.align = "left"; +} else { + log = window.new(nil, -30, 10, 10); +} log.sticky = 0; # do not turn on; makes scrolling up messages jump left and right var b = "/sim/screen/"; diff --git a/defaults.xml b/defaults.xml index d29bed096..a27e395ef 100644 --- a/defaults.xml +++ b/defaults.xml @@ -899,6 +899,7 @@ Started September 2000 by David Megginson, david@megginson.com true true + false diff --git a/gui/dialogs/view.xml b/gui/dialogs/view.xml index 9d78f0f31..574b3b7f5 100644 --- a/gui/dialogs/view.xml +++ b/gui/dialogs/view.xml @@ -147,6 +147,15 @@ + + left + + /sim/chat-on-the-left + + dialog-apply + + + left