From 729f61314c7274eaeb429b727fe3b81f7c48dbc2 Mon Sep 17 00:00:00 2001 From: Spypig23 <007skyfool@gmail.com> Date: Sun, 17 Aug 2025 19:20:19 +1000 Subject: [PATCH 1/2] scss refactor underway --- .../tgui/interfaces/FlightComputer.tsx | 246 ++++++------------ .../styles/interfaces/FlightComputer.scss | 79 ++++++ tgui/packages/tgui/styles/main.scss | 1 + 3 files changed, 157 insertions(+), 169 deletions(-) create mode 100644 tgui/packages/tgui/styles/interfaces/FlightComputer.scss diff --git a/tgui/packages/tgui/interfaces/FlightComputer.tsx b/tgui/packages/tgui/interfaces/FlightComputer.tsx index 23478d135cee..1fe8b3ba6704 100644 --- a/tgui/packages/tgui/interfaces/FlightComputer.tsx +++ b/tgui/packages/tgui/interfaces/FlightComputer.tsx @@ -48,103 +48,66 @@ export const FlightComputer = (props) => { const { act, data } = useBackend(); return ( - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - -
- - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - -
- - - - - - -
+ className="FlightComputer__Static" + > + + + + + + + + + + + + + + + + + +
); }; +const CrtDisplay = (props) => { + const { act, data } = useBackend(); + + return ( + + + + + + + + + + ); +}; + const FuelPanel = (props) => { const { act, data } = useBackend(); @@ -152,49 +115,41 @@ const FuelPanel = (props) => { return ( - - + + LEFT RIGHT - + F - - + 3/4 - - + 2/4 - - + 1/4 - - + E - - + @@ -202,7 +157,7 @@ const FuelPanel = (props) => { @@ -214,28 +169,20 @@ const FuelPanel = (props) => { width="26px" fontSize={1} bold - textColor="white" textAlign="right" > F - - + 3/4 - - + 2/4 - - + 1/4 - - + E - @@ -270,7 +217,7 @@ const FuelPanel = (props) => { {vtol_detected ? '[ 16,000L CAPACITY ]' : 'NONE DETECTED'} - + CELL @@ -279,34 +226,19 @@ const FuelPanel = (props) => { - + 2.8 - - + 2.1 - - + 1.4 - - + 0.7 - - + 0 - @@ -326,26 +258,19 @@ const FuelPanel = (props) => { - + 1.2kW - - + 0.9kW - - + 0.6kW - - + 0.9kW - - + 0kW - @@ -406,23 +331,6 @@ const FuelPanel = (props) => { ); }; -const CrtDisplay = (props) => { - const { act, data } = useBackend(); - - return ( - - - - - - - - - - - ); -}; - const TankReadouts = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/styles/interfaces/FlightComputer.scss b/tgui/packages/tgui/styles/interfaces/FlightComputer.scss new file mode 100644 index 000000000000..a1632d6d012d --- /dev/null +++ b/tgui/packages/tgui/styles/interfaces/FlightComputer.scss @@ -0,0 +1,79 @@ +.FlightComputer__Background { + width: 100%; + height: 100%; + position: absolute; + background-color: black; +} + +.FlightComputer__Gradient { + background: radial-gradient(#042208, #000b02); +} + +.FlightComputer__Casing { + height: 100%; + border-radius: 5px; + border: 4px solid rgb(7, 7, 7); + background-color: rgb(17, 17, 17); + padding: 6px; + max-width: 700px; + max-height: 410px; +} + +.FlightComputer__Static { + width: 100%; + height: 100%; + border-radius: 5px; + border: 2px solid #00e94e; + background: + linear-gradient(hsla(0, 6%, 7%, 0) 50%, hsla(0, 0%, 0%, 0.25) 50%), + linear-gradient( + 90deg, + hsla(0, 100%, 50%, 0.06), + hsla(120, 100%, 50%, 0.02), + hsla(240, 100%, 50%, 0.06) + ); + background-size: + 100% 2px, + 3px 100%; + .FlightComputer__Screen { + mix-blend-mode: color-dodge; + background: radial-gradient(#05a11ab7, #00250786); + width: 100%; + height: 100%; + padding-left: 1%; + padding-right: 2%; + color: #00e94e; + font-family: monospace; + } +} + +.FlightComputer__Fuel { + .FlightComputer__Divider { + border-right: 2px solid #00e94ed3; + padding-right: 6px; + margin-right: 6px; + } + .FlightComputer__Fuelnotch { + width: 30px; + margin-bottom: 14px; + } +} + +.FlightComputer__Gradient2 { + overflow: inherit; + + width: 100%; + height: 100%; + background-blend-mode: difference; + background: + linear-gradient(hsla(0, 6%, 7%, 0.582) 50%, hsla(0, 0%, 0%, 0.25) 50%), + linear-gradient( + 90deg, + hsla(0, 100%, 50%, 0.06), + hsla(120, 100%, 50%, 0.02), + hsla(240, 100%, 50%, 0.06) + ); + background-size: + 100% 2px, + 3px 100%; +} diff --git a/tgui/packages/tgui/styles/main.scss b/tgui/packages/tgui/styles/main.scss index 7547c6e29b55..0425b5403f98 100644 --- a/tgui/packages/tgui/styles/main.scss +++ b/tgui/packages/tgui/styles/main.scss @@ -94,6 +94,7 @@ @include meta.load-css('./interfaces/TacticalMap.scss'); @include meta.load-css('./interfaces/StripMenu.scss'); @include meta.load-css('./interfaces/CrewManifest.scss'); +@include meta.load-css('./interfaces/FlightComputer.scss'); // Layouts @include meta.load-css('./layouts/Layout.scss'); From 37f40de1bc12d17569d753f1373685fda6560f16 Mon Sep 17 00:00:00 2001 From: Spypig23 <007skyfool@gmail.com> Date: Mon, 18 Aug 2025 16:50:23 +1000 Subject: [PATCH 2/2] paintjob complete --- .../tgui/interfaces/FlightComputer.tsx | 140 +++++++++++------- .../styles/interfaces/FlightComputer.scss | 69 +++++---- 2 files changed, 128 insertions(+), 81 deletions(-) diff --git a/tgui/packages/tgui/interfaces/FlightComputer.tsx b/tgui/packages/tgui/interfaces/FlightComputer.tsx index 1fe8b3ba6704..3a594844523e 100644 --- a/tgui/packages/tgui/interfaces/FlightComputer.tsx +++ b/tgui/packages/tgui/interfaces/FlightComputer.tsx @@ -7,7 +7,6 @@ import { Box, Button, ColorBox, - Divider, Flex, RoundGauge, Stack, @@ -97,7 +96,7 @@ const CrtDisplay = (props) => { return ( - + @@ -122,7 +121,7 @@ const FuelPanel = (props) => { RIGHT - + { /> - - + + { - + @@ -196,12 +195,19 @@ const FuelPanel = (props) => { - + TANK VOLUME:{' '} { % - + FUEL TANK LEVELS @@ -224,9 +230,16 @@ const FuelPanel = (props) => { INPUT - - - + + + 2.8 - @@ -238,13 +251,13 @@ const FuelPanel = (props) => { 0.7 - - + 0 - - + @@ -252,31 +265,38 @@ const FuelPanel = (props) => { - - - + + + 1.2kW - - + 0.9kW - - + 0.6kW - - + 0.9kW - - + 0kW - - + { - + APROX CHARGE:{' '} { % - + POWERCELL CHARGE - + {vtol_detected ? '[ 2x Li BATTERY, KWh ]' : 'NONE DETECTED'}