Actor Info

class ActorInfo(rect: pygame.Rect, manager: UIManager)[source]

Bases: scripts.engine.widgets.window.Window

Full detail about an npc entity.

__init__(rect: pygame.Rect, manager: UIManager)[source]

Initialize self. See help(type(self)) for accurate signature.

cleanse()[source]

Cleanse existing section info.

process_close_button()[source]

Process closure of a window. Must be overriden in subclass. Usual use is creation of an event.

Example

def process_close_button(self):
event = pygame.event.Event(EventType.GAME, subtype=GameEvent.EXIT_MENU,

menu=UIElement.ACTOR_INFO)

pygame.event.post(event)

set_entity(entity: int)[source]

Set the selected entity to show the info for that entity.

show()[source]

Show the entity info. Builds the sections required, after clearing any existing.

update(time_delta: float)[source]

Update based on current state and data. Run every frame.