Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swedish textures on cockpit controls and panels. #66

Open
NikolaiVChr opened this issue Feb 8, 2019 · 1 comment
Open

Swedish textures on cockpit controls and panels. #66

NikolaiVChr opened this issue Feb 8, 2019 · 1 comment

Comments

@NikolaiVChr
Copy link
Owner

NikolaiVChr commented Feb 8, 2019

Idea by Albin Stigö. This can be done by having duplicate textures for each control/panel.

For example when I want to make a panel having dual texture I first find the xml file that loads the AC3D file for the panel.

Then I add this to that xml file for a AC file that has an object called 'panel' which has a texture called Aircraft/JA37/Models/Instruments/Radar/radar-panel.png:

<animation>
        <type>material</type>
        <object-name>panel</object-name>
        <property-base>ja37/language</property-base>
        <texture-prop>textureRadarPanel</texture-prop>
        <texture>radar-panel.png</texture>
    </animation>

Then in Nasal/ja37.nas I go to the line called if (me.currentUnit) { and add a pair of setprops for swedish and english name of texture. Later on when many textures use this, can refactor this code as it will be sizeable.

@colingeniet
Copy link
Collaborator

I would like to start implementing this since I am currently reworking the front panel, starting with the labels of the various indicator lights.

I suggest the following:

  • Add a new option (in the config menu), to choose the language of the cockpit.
  • Keep the existing HUD units option (and maybe add it to the config menu), so that it can be toggled in flight without changing the cockpit language.
  • However, to limit confusion, make the HUD units default to the same as the cockpit language.
  • Finally, remove the choice of units from the launcher states. The previous changes would make it unnecessary, and it never worked very well IMO: the language was forgotten when selecting a different aircraft/version, It would be better to have this options made persistent through aircraft-data.

Regarding the technical details, the implementation I was considering was to have the language controlled by, e.g. /ja37/english-cockpit, and for each relevant texture, have an animation

<animation>
  <type>material</type>
  <condition><property>/ja37/english-cockpit</property></condition>
  <texture>[texture name]-en.png</texture>
</animation>

to change the version as appropriate.
I think it would be simpler than what you proposed, mostly because it does not require additional properties for each texture. Is there a downside I am not seeing to my version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants