My last screenshot...
Forum rules
You can find the in-game gallery images on this separate page.
You can find the in-game gallery images on this separate page.
- BetterBear
- Inhabitant of a Galaxy Cluster
- Posts: 2896
- Joined: 18 Apr 2017, 09:03
- Location: In a place you don't expect.
- Plugins: Showcase Store
- Version: Beta
-
Platform
- CommanderABab
- AB
- Posts: 11241
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
- Bearbear76
- Former Bearbear65
- Posts: 5730
- Joined: 10 Feb 2017, 14:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
- BetterBear
- Inhabitant of a Galaxy Cluster
- Posts: 2896
- Joined: 18 Apr 2017, 09:03
- Location: In a place you don't expect.
- Plugins: Showcase Store
- Version: Beta
-
Platform
Re: My last screenshot...
He's the dev, he knows everything.
- Lobby
- Developer
- Posts: 3719
- Joined: 26 Oct 2008, 12:34
- Plugins: Showcase Store
- Version: Beta
-
Platform
Re: My last screenshot...
I can only change the language for resources for a short time. So I change the language, copy all the translated strings into an own data structure and use this one to resolve translation requests in the future. It has a bit of overhead, but it will only be used if user set another language manually.
Code wise the important part looks like
and isn't nice by any means. E.g. it uses reflection to get access on all translation ids which are stored as static fields in the R.string class.
Code wise the important part looks like
Code: Select all
Resources resources = context.getResources();
DisplayMetrics dm = resources.getDisplayMetrics();
Configuration configuration = resources.getConfiguration();
Configuration newConfig = new Configuration(configuration);
newConfig.locale = locale;
Resources res = new Resources(resources.getAssets(), dm, newConfig);
try {
Field[] fields = R.string.class.getDeclaredFields();
idToString = new SparseArray<>();
for (int i = 0; i < fields.length; i++) {
int id = (Integer) fields[i].get(null);
idToString.put(id, res.getString(id));
}
} catch (IllegalAccessException e) {
idToString = null;
}
resources.updateConfiguration(configuration, dm);
- Bearbear76
- Former Bearbear65
- Posts: 5730
- Joined: 10 Feb 2017, 14:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
Re: My last screenshot...
Show as the code all you want we won't be able to understand it




- BetterBear
- Inhabitant of a Galaxy Cluster
- Posts: 2896
- Joined: 18 Apr 2017, 09:03
- Location: In a place you don't expect.
- Plugins: Showcase Store
- Version: Beta
-
Platform
Re: My last screenshot...
Did anyone else lost their option to build runways? I lost it, but with some of them I kept I saw they are flashing now. Beautiful!
- Bearbear76
- Former Bearbear65
- Posts: 5730
- Joined: 10 Feb 2017, 14:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
Re: My last screenshot...
I dare someone to make a perfect Y junction in theotown



- Bearbear76
- Former Bearbear65
- Posts: 5730
- Joined: 10 Feb 2017, 14:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
- BetterBear
- Inhabitant of a Galaxy Cluster
- Posts: 2896
- Joined: 18 Apr 2017, 09:03
- Location: In a place you don't expect.
- Plugins: Showcase Store
- Version: Beta
-
Platform
Re: My last screenshot...
Anyone wants a pic?BetterBear wrote: ↑11 Aug 2017, 13:17Did anyone else lost their option to build runways? I lost it, but with some of them I kept I saw they are flashing now. Beautiful!
- Bearbear76
- Former Bearbear65
- Posts: 5730
- Joined: 10 Feb 2017, 14:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
- CommanderABab
- AB
- Posts: 11241
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
- Bearbear76
- Former Bearbear65
- Posts: 5730
- Joined: 10 Feb 2017, 14:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform