From 5ca84cbfdf96ebff1f92dbb0cbad94aa091cf026 Mon Sep 17 00:00:00 2001 From: Richard Harrison Date: Mon, 18 Sep 2017 00:48:20 +0200 Subject: [PATCH] Revised classic theme to make it use better fonts and colours. --- Nasal/multiplayer.nas | 20 ++- defaults.xml | 2 +- gui/dialogs/nasal-console.xml | 2 +- gui/styles/anthrax.xml | 2 +- gui/styles/classic.xml | 161 ------------------- gui/styles/tortola.xml | 289 ++++++++++++++++++++++++++++++++++ 6 files changed, 304 insertions(+), 172 deletions(-) delete mode 100644 gui/styles/classic.xml create mode 100644 gui/styles/tortola.xml diff --git a/Nasal/multiplayer.nas b/Nasal/multiplayer.nas index 90b87159c..d4b970ad5 100644 --- a/Nasal/multiplayer.nas +++ b/Nasal/multiplayer.nas @@ -147,24 +147,28 @@ var handle_key = func(key) # multiplayer.dialog.show() -- displays pilot list dialog # var PILOTSDLG_RUNNING = 0; - var dialog = { init: func(x = nil, y = nil) { me.x = x; me.y = y; - me.bg = [0, 0, 0, 0.3]; # background color - me.fg = [[0.9, 0.9, 0.2, 1], [1, 1, 1, 1], [1, 0.5, 0, 1]]; # alternative active & disabled color + me.bg = [0.1, 0.1, 0.1, 0.8]; # background color + me.fg = [[0.9, 0.9, 0.2, 1], [1, 1, 1, 1], [1, 0.7, 0, 1]]; # alternative active & disabled color me.unit = 1; me.toggle_unit(); # set to imperial # # "private" - var font = { name: "FIXED_8x13" }; + var font = ""; + if (getprop("/sim/gui/current-syle")) + font = {name: "FIXED_8x13" }; + else + font = { name: "AvantGarde-Demi.txf"}; + me.header = ["chat", " callsign"," code"," model", " brg", func dialog.dist_hdr, func dialog.alt_hdr ~ " ", "ignore" ~ " "]; me.columns = [ - { type: "button", legend: "", halign: "right", callback: "multiplayer.compose_message", "pref-height": 14, "pref-width": 14}, - { type: "text", property: "callsign", format: " %s", label: "-----------", halign: "fill" }, - { type: "text", property: "id-code", format: " %s", label: "-----", halign: "fill" }, - { type: "text", property: "model-short", format: "%s", label: "--------------", halign: "fill" }, + { type: "button", legend: "", halign: "right", callback: "multiplayer.compose_message", "pref-height": 14, "pref-width": 14 }, + { type: "text", property: "callsign", format: " %s", label: "-----------", halign: "fill" , font: font }, + { type: "text", property: "id-code", format: " %s", label: "-----", halign: "fill" , font: font }, + { type: "text", property: "model-short", format: "%s", label: "--------------", halign: "fill" , font: font }, { type: "text", property: "bearing-to", format: " %3.0f", label: "----", halign: "right", font: font }, { type: "text", property: func dialog.dist_node, format:" %8.2f", label: "---------", halign: "right", font: font }, { type: "text", property: func dialog.alt_node, format:" %7.0f", label: "---------", halign: "right", font: font }, diff --git a/defaults.xml b/defaults.xml index ec7b0580b..f0848619f 100644 --- a/defaults.xml +++ b/defaults.xml @@ -801,7 +801,7 @@ Started September 2000 by David Megginson, david@megginson.com 1 -