-
Notifications
You must be signed in to change notification settings - Fork 206
Open
Labels
Description
I'm trying to add the PortraitWindow to the demo. I modified guiw.chu with DLTCEP (added a window and a control button). Here is what I added to MessageWindow.py:
PortraitWindow = GemRB.LoadWindow(10, GUICommon.GetWindowPack(), WINDOW_RIGHT)
PortraitWindow.AddAlias("PORTWIN")
PortraitButton = MessageWindow.GetControl (24)
But when I run the demo, only the windows are visible, the player screen is completely black, as you can see in the attached screenshot. In the terminal, I get this error:
[Python/ERROR]: Traceback (most recent call last):
[Python/ERROR]: File "/usr/local/share/gemrb/GUIScripts/GUICommonWindows.py", line 1721, in UpdatePortraitWindow
[Python/ERROR]: Button.SetAction(lambda btn, val, pc=pcID: GemRB.GameControlLocateActor(pc), IE_ACT_MOUSE_ENTER);
[Python/ERROR]: AttributeError: 'NoneType' object has no attribute 'SetAction'
I'm obviously doing something wrong.
Here's a screenshot (I need to fine-tune the position of the portrait and the size of the column, it's a work in progress for now).
