Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

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.
 
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
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.
 
Newbie Spellweaver
Joined
Dec 15, 2010
Messages
11
Reaction score
4


Thanks A lot bobsobol ;D...
with your help I fixed this 'problem' ;).
 
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
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.
 
Newbie Spellweaver
Joined
Dec 15, 2010
Messages
11
Reaction score
4
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
Top