Skip to content

Commit

Permalink
feat: registration decal setting (#6099)
Browse files Browse the repository at this point in the history
* feat: registration decal setting

Co-authored-by: Saschl <19493808+Saschl@users.noreply.github.com>
Co-authored-by: Johan Bouveng <jb@oddlogic.se>
  • Loading branch information
3 people committed Nov 2, 2021
1 parent 691bb1a commit 4a363a3
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/CHANGELOG.md
Expand Up @@ -56,6 +56,7 @@
1. [FBW] Improved roll stability in turbulence or with performance issues - @IbrahimK42 (IbrahimK42) and @aguther (Andreas Guther)
1. [MCDU] Hide POSITION UPDATE AT field on PROG page when GPS is available - @BlueberryKing (BlueberryKing)
1. [MCDU] Sort approaches by type - @tracernz (Mike)
1. [MODEL] Add dynamic registration decal option - @tracernz (Mike)
1. [FCU] Autopilot button integ light brightness corrected - @tracernz (Mike)

## 0.7.0
Expand Down
Expand Up @@ -139,7 +139,7 @@ size_mm = 2048,512
texture = $RegistrationNumber
location = exterior

painting00=Registration/Registration.html?font_color=black, 0, 0, 2048, 512
painting00=A32NX_Registration/Registration.html, 0, 0, 2048, 512

[VPainting02]
size_mm=1024,1024
Expand Down
@@ -0,0 +1,12 @@
<!-- Original file licensed under Xbox Game Content Usage Rules -->
<link rel="stylesheet" href="../Registration/Registration.css" />

<script type="text/html" id="LiveryRegistration">
<div id="Mainframe">
<div id="background"></div>
<span id="text" style="color: black"></span>
</div>
</script>

<script type="text/html" import-script="/Pages/A32NX_Utils/NXDataStore.js"></script>
<script type="text/html" import-script="/Pages/VLivery/Liveries/A32NX_Registration/Registration.js"></script>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions src/instruments/src/EFB/Settings/Settings.tsx
Expand Up @@ -245,6 +245,8 @@ const SimOptionsPage = () => {
const [mcduInput, setMcduInput] = usePersistentProperty('MCDU_KB_INPUT', 'DISABLED');
const [mcduTimeout, setMcduTimeout] = usePersistentProperty('CONFIG_MCDU_KB_TIMEOUT', '60');

const [dynamicRegistration, setDynamicRegistration] = usePersistentProperty('DYNAMIC_REGISTRATION_DECAL', '0');

const adirsAlignTimeButtons: (ButtonType & AdirsButton)[] = [
{ name: 'Instant', setting: 'INSTANT', simVarValue: 1 },
{ name: 'Fast', setting: 'FAST', simVarValue: 2 },
Expand All @@ -263,6 +265,11 @@ const SimOptionsPage = () => {
{ name: 'hPa', setting: 'HPA' },
];

const dynamicRegistrationButtons: ButtonType[] = [
{ name: 'Disabled', setting: '0' },
{ name: 'Enabled', setting: '1' },
];

useEffect(() => {
setShowNavbar(!showThrottleSettings);
}, [showThrottleSettings]);
Expand Down Expand Up @@ -346,6 +353,21 @@ const SimOptionsPage = () => {
}}
/>
</div>

<div className="py-4 flex flex-row justify-between items-center">
<span className="text-lg text-gray-300 mr-1">Dynamic Registration Decal</span>
<SelectGroup>
{dynamicRegistrationButtons.map((button) => (
<SelectItem
enabled
onSelect={() => setDynamicRegistration(button.setting)}
selected={dynamicRegistration === button.setting}
>
{button.name}
</SelectItem>
))}
</SelectGroup>
</div>
</div>
<ControlSettings setShowSettings={setShowThrottleSettings} />
</>
Expand Down

0 comments on commit 4a363a3

Please sign in to comment.