View previous topic :: View next topic |
Author |
Message |
johnkittz Advanced Cheater Reputation: 0
Joined: 17 May 2016 Posts: 95 Location: orderandhacks
|
Posted: Tue Nov 22, 2016 2:18 am Post subject: Does CE support multi language trainers |
|
|
I've always wondered if it's possible to put a buttons on a CE trainer to translate back and fourth from two or three different languages
If this is possible, then could you show me how?
If this isn't possible, could it be in future updates ?
_________________
Another Day, Another Hack. |
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Tue Nov 22, 2016 3:44 am Post subject: |
|
|
I think, it should be possible. One, crude way, would be to use multiple forms and just set up each language under a different form, and just add a button to navigate between them or a button for each language selection.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Tue Nov 22, 2016 6:57 am Post subject: |
|
|
at launchtime perhaps (using the same way ce does it) but actively switch betweem them, no. (ce can't do that either)
just store your strings in a lua table and adjust the strings on the fly
e. g
Code: |
trans={}
trans['nl'] ={}
trans['nl']['hello'] ='hallo'
trans['nl']['Press 1 for godmode']='Druk op 1 voor onsterfelijkheid'
....
lang='nl'
...
form.welcome.caption=trans[lang]['hello']
form.cheat1.caption=trans[lang]['Press 1 for godmode']
...
|
and to make your code cleaner you could put the original english strings in a single variable
e. g strHi='hello' and then use strHi everywhere
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Tue Nov 22, 2016 1:56 pm Post subject: |
|
|
Dark Byte-
Is it possible to do with multiple forms? I am not really sure, to be honest, as I have not tried doing anything like that before. I am just wondering how well this would work the way that you have suggested since I assumed that those different translations/strings would need a dynamic interface to accommodate the different space requirements while still looking good etc..
I'm mostly curious about how the forms work since I'd like to know if creating additional 'pages' is possible for a CE trainer, in the event that the feature list is too long - as an effort to preserve space.
Thanks.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Tue Nov 22, 2016 2:15 pm Post subject: |
|
|
if you want to deal with changing sizes then i recommend using anchors. e. g tell it that a button has to be a specific size away from a label
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Tue Nov 22, 2016 2:27 pm Post subject: |
|
|
Does this work the same for the main, window border...I mean, can the main interface be dynamically adjustable in the same fashion? Thanks, again.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Tue Nov 22, 2016 2:37 pm Post subject: |
|
|
I prefer to use the OnShow of the form to adjust the size of the form to the new layout, but sometimes just setting a form to autosize will adjust it to the new sizes as well. (you may want to toggle it on and off in the onshow to prevent some bugs)
But just play with the anchor editor. (rightclick components and tell them how they should look.
E.g in the center of the control on the left, or below it, etc.... Then when the control on the left changes size, the position of your control changes as well
This is also important if you want to make DPI aware gui's for lua scripts.
For trainers it's no issue as I've disabled dpiaware for those, but lua extensions should not use hardcoded height, width, left, or right (easy way to test, just set your ce fontsize to 19 or something)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Tue Nov 22, 2016 3:17 pm Post subject: |
|
|
Thanks, Dark Byte. I don't want to derail this topic, but I'm curious about other things now. I'll have to do some digging to see what can be done with the trainer generator, as my LUA skills are null.
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 138
Joined: 06 Jul 2014 Posts: 4275
|
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Tue Nov 22, 2016 3:27 pm Post subject: |
|
|
Told you.
|
|
Back to top |
|
|
|