Notifications

Bhruic

Emperor
Joined
Nov 15, 2005
Messages
1,457
I'm trying to add a new notification in my script. Unfortunately it seems like I'm banging my head against the wall.

FromLua called on NotificationAdded- this shouldn't happen. Use UI.AddNotification()

That's the error I got when I tried, for informational sake, to call Events.NotificationAdded directly. The problem is, UI. AddNotification isn't exposed to Lua, so you can't call it. This leads to the banging my head part, I can't seem to find any other way to add notifications. I can manually call OnNotificationAdded(), but while that will put a fake notification up, you can't actually interact with it, and you can't even remove it.

So on the off chance that someone with more knowledge/insight than I have has an idea, I welcome any suggestions. :)

Bh
 
Well, after lots... and lots... and lots of file hacking, I finally managed to come up with a system that works. It doesn't do "real" notifications, but it can fake them well enough.

If anyone else is interested in using the system, let me know, and I can write something up on it. But ideally, Firaxis will implement UI.AddNotification() in Lua sooner rather than later.

Bh
 
I would love to see how it's done, yes. It doesn't have to be uber-detailed, just a working example with a little explanation is a great start.
 
Top Bottom