| Games-Risk documentation | view source | Contained in the Games-Risk distribution. |
Games::Risk::Tk::Cards - cards listing
version 3.103040
GR::Tk::Cards implements a POE session, creating a Tk window to
list the cards the player got. It can be used to exchange cards with new
armies during reinforcement.
$K->post( cards => 'card_add', $card );
Player just received a new $card, display it.
$K->post( cards => 'card_del', @cards );
Player just exchanged some @cards, remove them.
$K->post( cards => 'attack' );
Prevent user to exchange armies.
$K->post( cards => 'place_armies' );
Change exchange button state depending on the cards selected.
$K->post( 'gui-continents' => 'shutdown' );
Kill current session. The toplevel window has already been destroyed.
$K->post( 'gui-continents' => 'visibility_toggle' );
Request window to be hidden / shown depending on its previous state.
Games::Risk::Tk::Cards->new(%opts);
Create a window listing player cards, and return the associated POE session ID. One can pass the following options:
A Tk window that will be the parent of the toplevel window created. This parameter is mandatory.
The newly created POE session accepts the following events:
Add $card to the list of cards owned by the player to be shown.
Remove $card from the list of cards owned by the player to be shown.
Request window to be hidden / shown depending on its previous state.
Jerome Quelin
This software is Copyright (c) 2008 by Jerome Quelin.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007
| Games-Risk documentation | view source | Contained in the Games-Risk distribution. |