MODULE: ChatDisplay (show a WhatsApp-like dialogue on GUI Button)

Started by Khris, Mon 06/03/2017 14:29:23

Previous topic - Next topic

granulac

This was totally it - I had a few buttons visible! It's working perfectly now. Thank you so much, Khris!

Khris

Great!

I should probably add an .Enabled bool to the chats... :P

Snarky

@Khris, just thought you might want to be aware that this module causes Perfect Tides to crash when run in debug builds of the engine and the OpenGL renderer, due to it attempting to create DynamicSprites with 0 or negative sizes.

https://github.com/adventuregamestudio/ags/issues/1973

Khris

@Snarky
Thanks, I found the issue I hope and I've updated the file. I've also fixed an issue with using a semi-transparent background sprite.

Crimson Wizard

In "Perfect Tides" these chat windows were also causing a significant slowdown, seemingly because many dynamic sprites were recreated and/or redrawn, but I did not investigate whether this is caused by the module itself or its misuse in game script.

Khris

The module isn't optimized for tons of chats/messages and can get pretty slow I guess; it does have a CleanUp() function though that should be called on chats that are no longer needed.

Snarky

ISTR that the apparent issue was that the windows are recreated or at least rerendered constantly, even when nothing is happening.

Edit: Well, I guess I just restated CW's post. The point being that quite apart from the lack of optimization of the rendering logic, it doesn't seem necessary to re-render the graphics at all unless there's an update.

SMF spam blocked by CleanTalk