HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Resolved] Chat Boxes keep relocating!  (Read 736 times)

ABetterBard

  • General Accounts
  • *
  • Posts: 2
  • Meedly mee.
    • View Profile
[Resolved] Chat Boxes keep relocating!
« on: Oct 09, 11, 09:41:39 AM »

Hello all! Have a small UI problem, hope someone can help.

I've made a chat window using _window as a base, and have embedded both E_ChatInputBox and E_ChatWindow into the chat window. They are positioned correctly, are showing up correctly, and when I activate the UI for it everything looks fine.

Here's my problem: As soon as I hit enter to send something to chat, the E_ChatWindow moves itself to the top left corner of my screen, and when I hit enter again to send a new line of text the E_ChatInputBox relocates itself as well. I'm guessing there's something in script telling these two to relocate but I haven't to foggiest where to start looking.

Help!
« Last Edit: Nov 01, 12, 10:40:22 AM by HE-Cooper »
Logged
"I know many stories, Traveler. Will you tell me yours?"

ABetterBard

  • General Accounts
  • *
  • Posts: 2
  • Meedly mee.
    • View Profile
Re: Chat Boxes keep relocating!
« Reply #1 on: Oct 09, 11, 11:32:48 AM »

so it looks like I can move where the chat/input box are, but they only change on worldload. So I'm guessing somewhere it's spawning these two pieces of UI on world load...

...time to go deeper...  ;)
Logged
"I know many stories, Traveler. Will you tell me yours?"

HE-JAY

  • HeroEngine
  • *****
  • Posts: 122
    • View Profile
Re: Chat Boxes keep relocating!
« Reply #2 on: Oct 10, 11, 10:58:24 AM »

In order to retain the positioning of a GUI control, you'll need to create a configuration/settings system to persist a client's settings (to the LRC, perhaps, or on the server as persisted player settings). The strange movements of your window are likely due to the fact that you're embedding a _window within a _window; I cannot predict what that might do (:

I would recommend you either inherit a guicontrol from the E_ChatWindow class or create your own guicontrol inheriting from _window; embedding one inside the other may produce undefined results as one or both think they're the top-level control. (:
Logged