Open Effektus opened 2 years ago
@Effektus These buttons are images taken from the resources of the original game. If you have a localized variant of the original game, these buttons will have localized inscriptions, otherwise they will have English inscriptions. The "Battle Only" button is absent in the original resources, it is "hand-made" (generated by engine), so it's localized (sort of).
I did not understand? My question is, is anyone making these translated pictures now, or is the engine generating them?
@Effektus These translated pictures are done by the publisher of the original game a long time ago for localized distributions intended for the respective countries. There is only one (AFAIK) button image generated by the engine - for the "Battle Only" button.
Yes my question is why is only one generated and where is this engine? It is build in "fheroes2" or it is outside project?
@Effektus Because such generation is a difficult task (I suppose @zenseii would be able to describe this process in detail), and this is just for the one button. We can not just supply a "localized copies" of these images with fheroes2 due to the licensing issues.
Hi, @Effektus.
As @oleg-derevenetz described thoroughly we are writing code that in runtime generates these buttons, because simply editing them in a graphics editing tool like photoshop and then distributing them with fheroes2 would lead to both licensing and copyright issues because we do not own these assets.
As for why the rest have not been translated it is because this is work in progress. I was intending to do this but right now I'm lost without a PC to develop on for an indefinite time due to unforseen events. Anyone is more than welcome to do this work and also to ask for help in achieving it. The foundaments have already been put in place to make it possible.
Also note that we have actually generated 5 buttons: Battle Only, Difficulty, Min (Recruit), Min (Fast split), Gift.
Also, @oleg-derevenetz, please note a minor typo 😅
@sensei
@zenseii
Also, @oleg-derevenetz, please note a minor typo 😅
Yes, sorry :)
OK I want to help for this job too! Please explain to me how?
OK I want to help for this job too! Please explain to me how?
I'll explain this once I have some free time to, but you can start by looking at recent PRs where we added button generation. The relevant code lies in the source file agg_image.cpp, the fheroes2 namespace in a function for default button generation. Some button generation needs to be moved from the function called LoadModifiedICN over to generateDefaultButton() and then modified to make use of the renderTextOnButton() function.
I'm just writing this from the top of my head so please try to find one of the recent PRs I did adding MIN button generation for the fast splitting dialog.
Hi, @Effektus.
Please have a look at this PR to see what needs to be done to make a button translateable: https://github.com/ihhub/fheroes2/pull/6031/files
There are some similar cases as MIN/MAX which can still be done, while for buttons like DISMISS more new code will have to be written.
Here are some buttons that can be done exactly like I did in the above PR for the button ICN::UNIFORM_GOOD_MIN_BUTTON
.
BATTLESKIP, BATTLEWAIT, BUYMAX:
https://github.com/ihhub/fheroes2/blob/07319cd7b6762071d04f5d2dcec93dda2da5dbee/src/fheroes2/agg/agg_image.cpp#L961-L1003
Further down there's BTNCONFIG: https://github.com/ihhub/fheroes2/blob/07319cd7b6762071d04f5d2dcec93dda2da5dbee/src/fheroes2/agg/agg_image.cpp#L1017-L1026
Please ask if you have any questions regarding this, @Effektus.
I also suggest renaming this issue to something like "Translate game buttons".
I'll start with a PR addressing these.
Hi, @Effektus.
Please have a look at this PR to see what needs to be done to make a button translateable: https://github.com/ihhub/fheroes2/pull/6031/files
There are some similar cases as MIN/MAX which can still be done, while for buttons like DISMISS more new code will have to be written.
Here are some buttons that can be done exactly like I did in the above PR for the button
ICN::UNIFORM_GOOD_MIN_BUTTON
. BATTLESKIP, BATTLEWAIT, BUYMAX:Further down there's BTNCONFIG:
Please ask if you have any questions regarding this, @Effektus.
I also suggest renaming this issue to something like "Translate game buttons".
I will try
I will try
@Effektus I've already made a PR with all of these buttons, so please wait until that has been merged : https://github.com/ihhub/fheroes2/issues/6105
Then we can come back to see what needs to be done.
Your question
And what hapend with menu translation i found only "Only battle" working?
Additional info