1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

how to do line breaks in LocalMessage text?

Discussion in 'Programming' started by chip, May 19, 2004.

  1. chip

    chip New Member

    Joined:
    Nov 14, 2002
    Messages:
    524
    Likes Received:
    0
    OK, my graphic design career roots are showing -- i want to break a LocalMessage text line into two stacked lines, but haven't been able to figure the characters to use to force a line break. in some instances in UT2003 you could use || to do this, but in LocalMessage that just results in || on-screen.

    i couldn't find any examples in other LocalMessage subclasses -- these may break due to length but i saw no forced line breaks that i recognized as such.

    any suggestions?
     
  2. RegularX

    RegularX Master of Dagoth Lies

    Joined:
    Feb 2, 2000
    Messages:
    1,215
    Likes Received:
    0
    AFAIK, there is none. You could do two seperate messages and coordinate them.
     
  3. chip

    chip New Member

    Joined:
    Nov 14, 2002
    Messages:
    524
    Likes Received:
    0
    thanks, RegularX, i've come to that conclusion myself. seems a bit kludgy, but your suggestion is likely the only way to go with a LocalMessage string.
     
  4. chip

    chip New Member

    Joined:
    Nov 14, 2002
    Messages:
    524
    Likes Received:
    0
    actually it wasn't kludgy at all, i just needed to look closer at the LocalMessage properties.

    declare two (or more, probably) localized string variables in a LocalMessage subclass, and reference them in a case/switch statement (see GameMessage for an example). then in defaultproperties set the StackMode of the LocalMessage subclass to either SM_Up or SM_Down.

    to display the stacked message, sequentially call ReceiveLocalizedMessage() in your PlayerController, and specify the two(or more) messages in the switch parameter of the function. when displayed, the messages automatically stack. with StackMode = SM_None, the two strings overlay one another.

    i set the booleans for my LocalMessage subclass to bIsConsoleMessage = false, bIsSpecial = true and bIsUnique = false. other settings may affect how this setup works.
     
  5. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    If you look in those respective classes, you will actually find some code which actually detects these '||' and automatically add in a line break. This wasn't a native thing.
     

Share This Page