My last screenshot...

Display your city's beauty to the world. Capture and share captivating screenshots of your urban creations in this community forum. Inspire others with your remarkable designs and receive recognition for your visionary city-building skills!
User avatar
Lobby
Developer
Reactions:
Posts: 3705
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

Re: My last screenshot...

#481

Post by Lobby »

2017-08-10 15.08.34.png

User avatar
Josh
Graphic designer
Reactions:
Posts: 2214
Joined: 11 Mar 2017, 19:20
Location: The Netherlands
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: My last screenshot...

#482

Post by Josh »

WoW :o all languages

User avatar
Josh
Graphic designer
Reactions:
Posts: 2214
Joined: 11 Mar 2017, 19:20
Location: The Netherlands
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: My last screenshot...

#483

Post by Josh »

I am going to play in Russiannnnnn!!!!!

User avatar
Lobby
Developer
Reactions:
Posts: 3705
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

Re: My last screenshot...

#484

Post by Lobby »

Changing the language has to do with hacking behind the scenes. But I got so much requests for this feature that I think it is worth it :bc

User avatar
BetterBear
Inhabitant of a Galaxy Cluster
Reactions:
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...

#485

Post by BetterBear »

Lobby wrote:
10 Aug 2017, 15:15
2017-08-10 15.08.34.png
Now Im gonna see all your horrible and unfinished translations :evil: :lol:

User avatar
waders
TheoTown Veteran
Reactions:
Posts: 1130
Joined: 25 Mar 2016, 23:26
Location: Poland
Plugins: Showcase Store
Version: Beta

Platform

Re: My last screenshot...

#486

Post by waders »

Zone for the rich
Attachments
Screenshot_2017-08-10-21-40-18.png

User avatar
CommanderABab
AB
Reactions:
Posts: 11086
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: My last screenshot...

#487

Post by CommanderABab »

Nice!

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: My last screenshot...

#488

Post by Bearbear76 »

Lobby wrote:
10 Aug 2017, 15:21
Changing the language has to do with hacking behind the scenes. But I got so much requests for this feature that I think it is worth it :bc
How did you do it I'm curious

User avatar
BetterBear
Inhabitant of a Galaxy Cluster
Reactions:
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...

#489

Post by BetterBear »

He's the dev, he knows everything.

User avatar
Lobby
Developer
Reactions:
Posts: 3705
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

Re: My last screenshot...

#490

Post by Lobby »

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

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);
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.

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: My last screenshot...

#491

Post by Bearbear76 »

Show as the code all you want we won't be able to understand it :lol: :lol: :lol:

User avatar
BetterBear
Inhabitant of a Galaxy Cluster
Reactions:
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...

#492

Post by BetterBear »

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!

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: My last screenshot...

#493

Post by Bearbear76 »

I dare someone to make a perfect Y junction in theotown :evil: :D

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: My last screenshot...

#494

Post by Bearbear76 »

7/10

User avatar
malsa
Inhabitant of a Multiverse
Reactions:
Posts: 5085
Joined: 10 Feb 2017, 17:40
Location: Malaysia
Plugins: Showcase Store
Version: Beta

Platform

Re: My last screenshot...

#495

Post by malsa »

9/10

User avatar
BetterBear
Inhabitant of a Galaxy Cluster
Reactions:
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...

#496

Post by BetterBear »

BetterBear wrote:
11 Aug 2017, 13:17
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!
Anyone wants a pic?

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: My last screenshot...

#497

Post by Bearbear76 »

Ok

User avatar
Josh
Graphic designer
Reactions:
Posts: 2214
Joined: 11 Mar 2017, 19:20
Location: The Netherlands
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: My last screenshot...

#498

Post by Josh »

IGN 11/10

User avatar
CommanderABab
AB
Reactions:
Posts: 11086
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: My last screenshot...

#499

Post by CommanderABab »

Screenshot_20170812-033446.jpg
Screenshot_20170812-033020.jpg

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: My last screenshot...

#500

Post by Bearbear76 »

Lol :lol:

Post Reply Previous topicNext topic

Return to “Screenshots”