centralizing the item's status

Newbie Spellweaver
Joined
Dec 15, 2010
Messages
11
Reaction score
4
Hey,
I translated the Korean Game to the portuguese, but the translation isn't centralized.

Here are the pictures:

That's how it is:

This is the correct:

My Item's status are aligned on the left... I want centralized

Can someone help me? thanks.
 
The API which produces the text on screen does not support anything other than left aligned text. (actually, default alignment... because it's aligned right in RTL reading order like Arabic or Hebrew)

The API (OS function) is .
Code:
BOOL TextOut(
  __in  HDC hdc,
  __in  int nXStart,
  __in  int nYStart,
  __in  LPCTSTR lpString,
  __in  int cchString
);
As you can see, there is no "alignment", only nXStart, nYStart.

To properly correct, you must manually adjust each call to this function, altering those parameters. However, most people insert space " " characters to make it look a bit nicer for less effort.

If you check out I was working on, you may find that it redirects the TextOut() function to a custom one and replaces the string passed. You can also replace the positioning information, and before I hit a "bug wall" I intended to do that. :wink:

You may have more success with a similar technique, and I'm thinking along similar lines myself.
 
And thank you for the update. Looks like a novel solution. Most people try to align the colons. ^_^ Any other details you could share? Code snippet or the method and approach? (Olly / C++ etc.) Just out of curiosity, and because this seems like a success story others could learn from.
 
hey,
I fixed this 'error' with Olly... 'cause I'm still a beginner on C++...
I used your explanation to do it, I started by API TextOut and searched the calls on it.
next to one of the calls, you can find the solution ^^...

( I'm not so good with explanations ;D )
 
Back