Displays all of the players in the PlayerDatabase in a list control, with drag and drop initiation. Players are displayed as in the base class wxPlayerListCtrl. However, with wxPlayerDropListCtrl, users can select a player in the list, hold down the left mouse button, and drag them to another object that supports receiving Player objects. The class also implements a mechanism for users to directly add a player in the list to the current Game by handling the double-click mouse event for the list control. If a player name is double-clicked, the player is added to the game via the RuleUIAddPlayer Rule.
A wxPlayerDropListCtrl object also refreshes itself whenever the eventPreGame Event is triggered. It repopulates itself with every player in the PlayerDatabase and then removes all players from the list that are already in the game.
Derived From
wxPlayerListCtrl
Project
Cities3D
Include
PlayerDropListCtrl.h
Summary
| Displays all of the players in the PlayerDatabase in a list control, with drag and drop initiation. |
| |
| |
| The wxPlayerDropListCtrl constructor. |
| |
| The wxPlayerDropListCtrl destructor. |
| |
| Adds a new player to the list. |
| Changes the name of a player currently in the list. |
| |
| The wxWidgets event table declaration. |
| |
| |
| Repopulates the player list, removing all players already in the game. |
| |
| Handles a left mouse down event. |
| Handles a double-click in the player list. |