1
0
Fork 0

Revised classic theme to make it use better fonts and colours.

This commit is contained in:
Richard Harrison 2017-09-18 00:48:20 +02:00
parent 434d4fde90
commit 5ca84cbfdf
6 changed files with 304 additions and 172 deletions

View file

@ -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 },

View file

@ -801,7 +801,7 @@ Started September 2000 by David Megginson, david@megginson.com
</menubar>
<gui preserve="y">
<current-style type="int" userarchive="y">1</current-style>
<style n="0" include="gui/styles/classic.xml"/>
<style n="0" include="gui/styles/tortola.xml"/>
<style n="1" include="gui/styles/anthrax.xml"/>
<devel-widgets type="bool" userarchive="y">false</devel-widgets>
</gui>

View file

@ -45,7 +45,7 @@
<editable>true</editable>
<wrap>false</wrap>
<font>
<name>FIXED_8x13</name>
<name>AvantGarde-Book.txf</name>
</font>
<property>/sim/gui/dialogs/nasal-console/edit</property>
<binding>

View file

@ -8,7 +8,7 @@
"helvetica_bold.txf". "size" and "slant" take only effect on
texture fonts.
-->
<style-name>Anthrax</style-name>
<fonts>
<gui>
<name type="string">HELVETICA_12</name>

View file

@ -1,161 +0,0 @@
<?xml version="1.0"?>
<PropertyList>
<!-- possible font names:
"default", "FIXED_8x13", "FIXED_9x15", "TIMES_10", "TIMES_24",
"HELVETICA_10", "HELVETICA_12", "HELVETICA_14", "HELVETICA_18",
"SANS_12B", and all font file names from $FG_ROOT/Fonts/, such as
"helvetica_bold.txf". "size" and "slant" take only effect on
texture fonts.
-->
<fonts>
<gui>
<name type="string">Helvetica.txf</name>
<size type="float">15</size>
<slant type="float">0</slant>
</gui>
<splash>
<name type="string">HELVETICA_18</name>
<!--
<size type="float">19</size>
<slant type="float">0</slant>
-->
</splash>
<message-display>
<name type="string">SANS_12B</name>
</message-display>
</fonts>
<colors>
<!-- default colors for all GUI objects -->
<background>
<red type="float">0.8</red>
<green type="float">0.8</green>
<blue type="float">0.9</blue>
<alpha type="float">0.85</alpha>
</background>
<foreground>
<red type="float">0.8</red>
<green type="float">0.8</green>
<blue type="float">0.9</blue>
<alpha type="float">0.85</alpha>
</foreground>
<highlight>
<red type="float">1.0</red>
<green type="float">1.0</green>
<blue type="float">1.0</blue>
<alpha type="float">1.0</alpha>
</highlight>
<label>
<red type="float">0.0</red>
<green type="float">0.0</green>
<blue type="float">0.0</blue>
<alpha type="float">1.0</alpha>
</label>
<legend>
<red type="float">0.0</red>
<green type="float">0.0</green>
<blue type="float">0.0</blue>
<alpha type="float">1.0</alpha>
</legend>
<misc>
<red type="float">0.0</red>
<green type="float">0.0</green>
<blue type="float">0.0</blue>
<alpha type="float">1.0</alpha>
</misc>
<!-- GUI object specific colors -->
<hrule>
<red type="float">0.0</red>
<green type="float">0.0</green>
<blue type="float">0.0</blue>
<alpha type="float">1.0</alpha>
</hrule>
<vrule>
<red type="float">0.0</red>
<green type="float">0.0</green>
<blue type="float">0.0</blue>
<alpha type="float">1.0</alpha>
</vrule>
<checkbox-foreground>
<red type="float">0.8</red>
<green type="float">0.7</green>
<blue type="float">0.7</blue>
<alpha type="float">1.0</alpha>
</checkbox-foreground>
<checkbox-highlight> <!-- box frame -->
<red type="float">1</red>
<green type="float">0.9</green>
<blue type="float">0.9</blue>
<alpha type="float">1.0</alpha>
</checkbox-highlight>
<radio-foreground>
<red type="float">0.8</red>
<green type="float">0.7</green>
<blue type="float">0.7</blue>
<alpha type="float">1.0</alpha>
</radio-foreground>
<radio-highlight>
<red type="float">1</red>
<green type="float">0.9</green>
<blue type="float">0.9</blue>
<alpha type="float">1.0</alpha>
</radio-highlight>
<input-background>
<red type="float">0.4</red>
<green type="float">0.3</green>
<blue type="float">0.3</blue>
<alpha type="float">1.0</alpha>
</input-background>
<input-foreground>
<red type="float">0.8</red>
<green type="float">0.7</green>
<blue type="float">0.7</blue>
<alpha type="float">1.0</alpha>
</input-foreground>
<input-highlight>
<red type="float">1.0</red>
<green type="float">0.9</green>
<blue type="float">0.9</blue>
<alpha type="float">1.0</alpha>
</input-highlight>
<input-misc> <!-- cursor -->
<red type="float">0.1</red>
<green type="float">0.1</green>
<blue type="float">1.0</blue>
<alpha type="float">1.0</alpha>
</input-misc>
<!-- splash screen colors -->
<splash-font>
<red type="float">1.0</red>
<green type="float">0.9</green>
<blue type="float">0.0</blue>
</splash-font>
<splash-screen>
<red type="float">0.0</red>
<green type="float">0.0</green>
<blue type="float">0.0</blue>
</splash-screen>
</colors>
</PropertyList>

289
gui/styles/tortola.xml Normal file
View file

@ -0,0 +1,289 @@
<?xml version="1.0"?>
<PropertyList>
<!-- possible font names:
"default", "FIXED_8x13", "FIXED_9x15", "TIMES_10", "TIMES_24",
"HELVETICA_10", "HELVETICA_12", "HELVETICA_14", "HELVETICA_18",
"SANS_12B", and all font file names from $FG_ROOT/Fonts/, such as
"helvetica_bold.txf". "size" and "slant" take only effect on
texture fonts.
Colors for boxes:
mid FOREGROUND
hi HIGHLIGHT
lo BACKGROUND
Almost a new theme - not using any of the old inline bitmapped fonts because
they flicker on AMD hardware. As I can't find what's causing that instead
not using those fonts fixes the problem.
I also think it looks nice, but MRDA.
Richard Harrison; 2017-09-17
-->
<name>Tortola</name>
<fonts>
<gui>
<name type="string">AvantGarde-Demi.txf</name>
</gui>
<splash>
<name type="string">HELVETICA_18</name>
</splash>
<message-display>
<name type="string">Helvetica-BoldOblique.txf</name>
<!--helvetica_bold.txf-->
</message-display>
</fonts>
<colors>
<!-- default colors for all GUI objects -->
<background>
<red type="float">0.21</red>
<green type="float">0.212</green>
<blue type="float">0.221</blue>
<alpha type="float">0.8</alpha>
</background>
<foreground>
<red type="float">0.9</red>
<green type="float">0.9</green>
<blue type="float">0.9</blue>
<alpha type="float">0.9</alpha>
</foreground>
<highlight>
<red type="float">0.21</red>
<green type="float">0.212</green>
<blue type="float">0.221</blue>
<alpha type="float">1.0</alpha>
</highlight>
<label>
<red type="float">0.9</red>
<green type="float">0.9</green>
<blue type="float">0.9</blue>
<alpha type="float">0.9</alpha>
</label>
<legend>
<red type="float">0.0</red>
<green type="float">0.0</green>
<blue type="float">0.0</blue>
<alpha type="float">1.0</alpha>
</legend>
<misc>
<red type="float">0.0</red>
<green type="float">0.0</green>
<blue type="float">0.0</blue>
<alpha type="float">1.0</alpha>
</misc>
<hrule>
<red type="float">0.0</red>
<green type="float">0.0</green>
<blue type="float">0.0</blue>
<alpha type="float">1.0</alpha>
</hrule>
<vrule>
<red type="float">0.0</red>
<green type="float">0.0</green>
<blue type="float">0.0</blue>
<alpha type="float">1.0</alpha>
</vrule>
<checkbox-foreground>
<red type="float">0.51</red>
<green type="float">0.511</green>
<blue type="float">0.61</blue>
<alpha type="float">1.0</alpha>
</checkbox-foreground>
<combo-background>
<red type="float">0.31</red>
<green type="float">0.312</green>
<blue type="float">0.321</blue>
<alpha type="float">0.8</alpha>
</combo-background>
<editfield>
<red type="float">0.31</red>
<green type="float">0.312</green>
<blue type="float">0.321</blue>
<alpha type="float">0.8</alpha>
</editfield>
<combo-editfield>
<red type="float">0.31</red>
<green type="float">0.312</green>
<blue type="float">0.321</blue>
<alpha type="float">0.8</alpha>
</combo-editfield>
<select-editfield>
<red type="float">0.31</red>
<green type="float">0.312</green>
<blue type="float">0.321</blue>
<alpha type="float">0.8</alpha>
</select-editfield>
<textbox-editable>
<red type="float">0.31</red>
<green type="float">0.312</green>
<blue type="float">0.321</blue>
<alpha type="float">0.8</alpha>
</textbox-editable>
<text-background>
<red type="float">0.31</red>
<green type="float">0.312</green>
<blue type="float">0.321</blue>
<alpha type="float">0.8</alpha>
</text-background>
<checkbox-highlight>
<!-- box frame -->
<red type="float">0.51</red>
<green type="float">0.511</green>
<blue type="float">0.61</blue>
<alpha type="float">1.0</alpha>
</checkbox-highlight>
<text-highlight>
<red type="float">0.51</red>
<green type="float">0.511</green>
<blue type="float">0.61</blue>
<alpha type="float">1.0</alpha>
</text-highlight>
<textbox-highlight>
<red type="float">0.51</red>
<green type="float">0.511</green>
<blue type="float">0.61</blue>
<alpha type="float">1.0</alpha>
</textbox-highlight>
<radio-foreground>
<red type="float">0.51</red>
<green type="float">0.511</green>
<blue type="float">0.61</blue>
<alpha type="float">1.0</alpha>
</radio-foreground>
<radio-highlight>
<red type="float">0.51</red>
<green type="float">0.511</green>
<blue type="float">0.61</blue>
<alpha type="float">1.0</alpha>
</radio-highlight>
<slider-foreground>
<red type="float">0.571</red>
<green type="float">0.57</green>
<blue type="float">0.57</blue>
<alpha type="float">1.0</alpha>
</slider-foreground>
<slider-background>
<red type="float">0.571</red>
<green type="float">0.57</green>
<blue type="float">0.57</blue>
<alpha type="float">1.0</alpha>
</slider-background>
<slider-highlight>
<red type="float">0.371</red>
<green type="float">0.37</green>
<blue type="float">0.37</blue>
<alpha type="float">1.0</alpha>
</slider-highlight>
<input-background>
<red type="float">0.31</red>
<green type="float">0.312</green>
<blue type="float">0.321</blue>
<alpha type="float">1.0</alpha>
</input-background>
<input-foreground>
<red type="float">0.31</red>
<green type="float">0.312</green>
<blue type="float">0.321</blue>
<alpha type="float">1.0</alpha>
</input-foreground>
<input-highlight>
<red type="float">0.31</red>
<green type="float">0.312</green>
<blue type="float">0.321</blue>
<alpha type="float">1.0</alpha>
</input-highlight>
<input-misc>
<!-- cursor -->
<red type="float">1.0</red>
<green type="float">0.0</green>
<blue type="float">0.0</blue>
<alpha type="float">1.0</alpha>
</input-misc>
<textbox-background>
<red type="float">0.21</red>
<green type="float">0.212</green>
<blue type="float">0.221</blue>
<alpha type="float">1.0</alpha>
</textbox-background>
<textbox-foreground>
<red type="float">0.21</red>
<green type="float">0.212</green>
<blue type="float">0.221</blue>
<alpha type="float">1.0</alpha>
</textbox-foreground>
<textbox-highlight>
<!-- outer box and second color internall-->
<red type="float">0.23</red>
<green type="float">0.232</green>
<blue type="float">0.231</blue>
<alpha type="float">1.0</alpha>
</textbox-highlight>
<list-background>
<red type="float">0.21</red>
<green type="float">0.212</green>
<blue type="float">0.221</blue>
<alpha type="float">1.0</alpha>
</list-background>
<list-foreground>
<red type="float">0.21</red>
<green type="float">0.212</green>
<blue type="float">0.221</blue>
<alpha type="float">1.0</alpha>
</list-foreground>
<list-highlight>
<red type="float">0.23</red>
<green type="float">0.232</green>
<blue type="float">0.231</blue>
<alpha type="float">1.0</alpha>
</list-highlight>
<!-- splash screen colors -->
<splash-font>
<red type="float">1.0</red>
<green type="float">0.9</green>
<blue type="float">0.0</blue>
</splash-font>
<splash-screen>
<red type="float">0.0</red>
<green type="float">0.0</green>
<blue type="float">0.0</blue>
</splash-screen>
</colors>
</PropertyList>