Isle
Loading...
Searching...
No Matches
LegoControlManager Class Reference

[AI] Manages control presenters and dispatches notifications for control/input events within the LEGO Island engine. More...

#include <legocontrolmanager.h>

Inheritance diagram for LegoControlManager:
Collaboration diagram for LegoControlManager:

Public Member Functions

 LegoControlManager ()
 [AI] Constructs a LegoControlManager instance and registers it for tickle updates with the global tickle manager. More...
 
 ~LegoControlManager () override
 [AI] Destructor; unregisters this manager from tickle management. More...
 
MxResult Tickle () override
 [AI] Performs periodic processing on the control manager, advancing internal event state and dispatching notifications as needed. More...
 
const char * ClassName () const override
 [AI] Returns the class name for this object. More...
 
MxBool IsA (const char *p_name) const override
 [AI] Checks if this class or one of its ancestors matches the given name. More...
 
void FUN_10028df0 (MxPresenterList *p_presenterList)
 [AI] Assigns the active presenter list to this control manager. More...
 
void Register (MxCore *p_listener)
 [AI] Adds a listener to be notified of control events. More...
 
void Unregister (MxCore *p_listener)
 [AI] Removes a listener so it no longer receives control events. More...
 
MxBool FUN_10029210 (LegoEventNotificationParam &p_param, MxPresenter *p_presenter)
 [AI] Handles event notification logic, taking an event and possibly updating the manager/presenter state. More...
 
void FUN_100293c0 (MxU32 p_objectId, const char *p_atom, MxS16 p_unk0x4e)
 [AI] Dispatches a presenter event for the given object and atom parameters. More...
 
MxControlPresenterFUN_100294e0 (MxS32 p_x, MxS32 p_y)
 [AI] Finds the topmost control presenter at the given screen coordinates. More...
 
MxBool FUN_10029630 ()
 [AI] Handles "button down" logic for the input system over presenters. More...
 
MxBool FUN_10029750 ()
 [AI] Handles "button up" click resolution logic for the UI system. More...
 
void FUN_100292e0 ()
 [AI] Notifies all registered listeners with the current control event. More...
 
undefined4 GetUnknown0x0c ()
 [AI] Gets the internal flag at offset 0x0c. More...
 
undefined GetUnknown0x10 ()
 [AI] Gets the internal flag at offset 0x10. More...
 
- Public Member Functions inherited from MxCore
 MxCore ()
 [AI] Constructs a new MxCore object and assigns it a unique id. More...
 
virtual ~MxCore ()
 [AI] Virtual destructor. Required for correct polymorphic cleanup in derived classes. More...
 
virtual MxLong Notify (MxParam &p_param)
 [AI] Virtual callback notification mechanism. More...
 
virtual MxResult Tickle ()
 [AI] Called by tickle managers to allow the object to update itself. More...
 
virtual const char * ClassName () const
 [AI] Returns the runtime class name of this object. More...
 
virtual MxBool IsA (const char *p_name) const
 [AI] Checks whether this object's class type or parents match the given name. More...
 
MxU32 GetId ()
 [AI] Gets the unique (per-process) id assigned to this object instance. More...
 

Static Public Member Functions

static const char * HandlerClassName ()
 [AI] Returns the class name identifier for this handler. More...
 

Detailed Description

[AI] Manages control presenters and dispatches notifications for control/input events within the LEGO Island engine.

[AI] This class tracks active presenters (such as GUI controls), mediates click and button down/up events, and notifies registered listeners when user interactions occur. It maintains state for ongoing UI operations and acts as a central hub for input events that need to be broadcast within the game engine. [AI]

Definition at line 67 of file legocontrolmanager.h.

Constructor & Destructor Documentation

◆ LegoControlManager()

LegoControlManager::LegoControlManager ( )

[AI] Constructs a LegoControlManager instance and registers it for tickle updates with the global tickle manager.

Definition at line 17 of file legocontrolmanager.cpp.

◆ ~LegoControlManager()

LegoControlManager::~LegoControlManager ( )
override

[AI] Destructor; unregisters this manager from tickle management.

Definition at line 28 of file legocontrolmanager.cpp.

Member Function Documentation

◆ ClassName()

const char * LegoControlManager::ClassName ( ) const
overridevirtual

[AI] Returns the class name for this object.

Returns
[AI] Class name string "LegoControlManager".

Reimplemented from MxCore.

◆ FUN_10028df0()

void LegoControlManager::FUN_10028df0 ( MxPresenterList p_presenterList)

[AI] Assigns the active presenter list to this control manager.

Parameters
p_presenterList[AI] The list of presenters to manage. [AI]

[AI] This method resets tracked object/atom click state as part of the assignment.

Definition at line 34 of file legocontrolmanager.cpp.

◆ FUN_10029210()

MxBool LegoControlManager::FUN_10029210 ( LegoEventNotificationParam p_param,
MxPresenter p_presenter 
)

[AI] Handles event notification logic, taking an event and possibly updating the manager/presenter state.

Parameters
p_param[AI] Event notification param to process and possibly broadcast.
p_presenter[AI] Presenter related to the event.
Returns
[AI] True if the event was processed and relevant actions were triggered, false otherwise.

[AI] Used for centralized evaluation of button up/down events and event state coordination among controls.

Definition at line 59 of file legocontrolmanager.cpp.

◆ FUN_100292e0()

void LegoControlManager::FUN_100292e0 ( )

[AI] Notifies all registered listeners with the current control event.

[AI] Traverses all in m_notifyList and invokes Notify(m_event) for each.

Definition at line 111 of file legocontrolmanager.cpp.

◆ FUN_100293c0()

void LegoControlManager::FUN_100293c0 ( MxU32  p_objectId,
const char *  p_atom,
MxS16  p_unk0x4e 
)

[AI] Dispatches a presenter event for the given object and atom parameters.

Parameters
p_objectId[AI] Object ID to match against the presenter's action.
p_atom[AI] Atom string to match.
p_unk0x4e[AI] Argument passed to the presenter.

[AI] Finds the matching presenter and invokes a specific presenter callback.

Definition at line 124 of file legocontrolmanager.cpp.

◆ FUN_100294e0()

MxControlPresenter * LegoControlManager::FUN_100294e0 ( MxS32  p_x,
MxS32  p_y 
)

[AI] Finds the topmost control presenter at the given screen coordinates.

Parameters
p_x[AI] X coordinate (screen-space).
p_y[AI] Y coordinate (screen-space).
Returns
[AI] Pointer to the control presenter if found, else NULL.

Definition at line 148 of file legocontrolmanager.cpp.

◆ FUN_10029630()

MxBool LegoControlManager::FUN_10029630 ( )

[AI] Handles "button down" logic for the input system over presenters.

Returns
[AI] True if a presenter handled the event and notifies listeners, false otherwise.

[AI] Iterates each control, sends the event, and if an interaction is processed, broadcasts notification via the notify list.

Definition at line 182 of file legocontrolmanager.cpp.

◆ FUN_10029750()

MxBool LegoControlManager::FUN_10029750 ( )

[AI] Handles "button up" click resolution logic for the UI system.

Returns
[AI] True if a complete click event was processed, false otherwise.

[AI] Used to finalize control interaction with object/atom.

Definition at line 201 of file legocontrolmanager.cpp.

◆ GetUnknown0x0c()

undefined4 LegoControlManager::GetUnknown0x0c ( )
inline

[AI] Gets the internal flag at offset 0x0c.

Returns
[AI] The value of m_unk0x0c.

[AI] The precise purpose of this flag is unknown.

Definition at line 179 of file legocontrolmanager.h.

◆ GetUnknown0x10()

undefined LegoControlManager::GetUnknown0x10 ( )
inline

[AI] Gets the internal flag at offset 0x10.

Returns
[AI] The value of m_unk0x10.

[AI] The precise purpose of this flag is unknown, but from code analysis, it seems to act as a boolean for button press state.

Definition at line 186 of file legocontrolmanager.h.

◆ HandlerClassName()

static const char * LegoControlManager::HandlerClassName ( )
inlinestatic

[AI] Returns the class name identifier for this handler.

Returns
[AI] String literal "LegoControlManager".

Definition at line 90 of file legocontrolmanager.h.

◆ IsA()

MxBool LegoControlManager::IsA ( const char *  p_name) const
overridevirtual

[AI] Checks if this class or one of its ancestors matches the given name.

Parameters
p_name[AI] Class name to check.
Returns
[AI] True if p_name matches this class or a parent, false otherwise.

Reimplemented from MxCore.

◆ Register()

void LegoControlManager::Register ( MxCore p_listener)

[AI] Adds a listener to be notified of control events.

Parameters
p_listener[AI] Object to receive control event notifications. Must implement Notify(). [AI]

Definition at line 43 of file legocontrolmanager.cpp.

◆ Tickle()

MxResult LegoControlManager::Tickle ( )
overridevirtual

[AI] Performs periodic processing on the control manager, advancing internal event state and dispatching notifications as needed.

[AI] Called by the tickle manager. This manages button up event processing and invokes click event resolutions if needed.

Returns
[AI] Always returns 0 (success).

Reimplemented from MxCore.

Definition at line 168 of file legocontrolmanager.cpp.

◆ Unregister()

void LegoControlManager::Unregister ( MxCore p_listener)

[AI] Removes a listener so it no longer receives control events.

Parameters
p_listener[AI] Listener to remove.

Definition at line 50 of file legocontrolmanager.cpp.


The documentation for this class was generated from the following files: