11 #include "IAgentList.h" 12 #include "addons/AddonEvents.h" 13 #include "games/GameTypes.h" 14 #include "games/controllers/ControllerTypes.h" 15 #include "utils/Observer.h" 62 void OnItemFocus(
unsigned int itemIndex);
63 void OnAgentFocus(
const std::string& focusedAgent);
64 void OnItemSelect(
unsigned int itemIndex);
65 void OnAgentSelect(
const CFileItem& selectedAgentItem);
72 std::unique_ptr<CGUIViewControl> m_viewControl;
73 std::unique_ptr<CFileItemList> m_vecItems;
74 unsigned int m_currentItem{0};
75 std::string m_currentAgent;
Definition: GUIViewControl.h:19
void SetFocused() override
The agent list has been focused in the GUI.
Definition: GUIAgentList.cpp:168
void OnWindowUnload() override
Callback when the GUI window is unloaded.
Definition: GUIAgentList.cpp:61
bool Initialize(GameClientPtr gameClient) override
Initialize resources.
Definition: GUIAgentList.cpp:66
void Notify(const Observable &obs, const ObservableMessage msg) override
Process a message from an observable.
Definition: GUIAgentList.cpp:180
A list populated by game-playing agents (CGameAgent)
Definition: IAgentList.h:35
Represents a list of files.
Definition: FileItem.h:721
bool HasControl(int controlId) const override
Query if a control with the given ID belongs to this list.
Definition: GUIAgentList.cpp:105
void OnSelect() override
The agent list has been selected in the GUI.
Definition: GUIAgentList.cpp:173
void Deinitialize() override
Deinitialize resources.
Definition: GUIAgentList.cpp:89
Definition: GUIAgentList.h:34
Definition: AudioDecoder.h:18
void OnWindowLoaded() override
Callback when the GUI window is loaded.
Definition: GUIAgentList.cpp:54
Definition: Observer.h:31
std::shared_ptr< CGameClient > GameClientPtr
Smart pointer to a game client (CGameClient)
Definition: GameTypes.h:29
Definition: AddonEvents.h:18
Definition: GUIWindow.h:58
void Refresh() override
Refresh the contents of the list.
Definition: GUIAgentList.cpp:131
void FrameMove() override
Called once per frame.
Definition: GUIAgentList.cpp:115
Definition: Observer.h:44
Class to represent a game player (a.k.a. agent)
Definition: GameAgent.h:31
Represents a file on a share.
Definition: FileItem.h:102
int GetCurrentControl() const override
Query the ID of the current control in this list.
Definition: GUIAgentList.cpp:110