Speaking-Interface

  • #1, by crankshaft87Friday, 09. October 2015, 00:05 5 years ago
    Hello Guys!

    Im wondering how to make a Text-Interface really easy. What i mean is: An fixed area of the screen where the text of my character appears, even if he is only speaking to himself with a portrait showing. The red background should represent the scene. If you dont know exactly what i mean, i attached a little sketch.

    Thanks very much in advance!

    Newbie

    20 Posts


  • #2, by afrlmeFriday, 09. October 2015, 00:20 5 years ago
    You will need to use a registerHookFunction() with setTextPosition hook to force the text to the positions you want.

    You can also use registerEventHandler() functions to detect when text is started or stopped.

    Both of those functions allow you to check the owner of the text too, so on text start you could query if text belong to current character else it belongs to another. So you could set a condition based on the owner to enable the correct portrait avatars & determine if text should be on the left or the right.

    In regards to the text, you should consider setting a fixed width inside of the font properties page so that the text automatically drops down to a new line when a word goes past the specified width.

    http://wiki.visionaire-tracker.net/wiki/RegisterEventHandler
    http://wiki.visionaire-tracker.net/wiki/RegisterHookFunction

    P.S: sorry it's a bit late for me to start providing proper examples & I've also got a terrible headache at the minute, so I'm having trouble concentrating.

    Anyway, hopefully what I've said & the links I've provided will be enough to get you on the right path.

    Imperator

    6815 Posts

  • #3, by crankshaft87Friday, 09. October 2015, 00:28 5 years ago
    Thank you very much! Thats something i can work with i think.

    Newbie

    20 Posts

  • #4, by crankshaft87Friday, 09. October 2015, 00:28 5 years ago
    Thank you very much! Thats something i can work with i think.

    Newbie

    20 Posts

Write post