1
0
Fork 0

Add option to move chat to the left and align left.

This commit is contained in:
Michael Danilov 2021-01-12 21:17:56 +01:00
parent 4b44878843
commit a2c3c4c3d8
3 changed files with 21 additions and 2 deletions

View file

@ -549,7 +549,11 @@ _setlistener("/sim/signals/nasal-dir-initialized", func {
#-- Init -----------------------------------------------------------------------
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);
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/";

View file

@ -899,6 +899,7 @@ Started September 2000 by David Megginson, david@megginson.com
<auto-attach type="bool" userarchive="y">true</auto-attach>
</mp-carriers>
<freeze-mouse-flight-controls-on-pause type="bool" userarchive="n">true</freeze-mouse-flight-controls-on-pause>
<chat-on-the-left type="bool" userarchive="y">false</chat-on-the-left>
</sim>
<!-- accelerations -->
<accelerations>

View file

@ -147,6 +147,15 @@
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Chat and event log on the left (requires restart)</label>
<property>/sim/chat-on-the-left</property>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Show popup messages</label>