NAME
Games::Risk::GUI::Cards - cards listing
VERSION
version 3.101430
DESCRIPTION
GR::GUI::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.
SYNOPSYS
my $id = Games::Risk::GUI::Cards->spawn(%opts);
Poe::Kernel->post( $id, 'card', $card );
CLASS METHODS
my $id = Games::Risk::GUI::Cards->spawn( %opts );
Create a window listing player cards, and return the associated POE session ID. One can pass the following options:
- parent => $mw
-
A Tk window that will be the parent of the toplevel window created. This parameter is mandatory.
PUBLIC EVENTS
The newly created POE session accepts the following events:
card_add( $card )
Add
$card
to the list of cards owned by the player to be shown.card_del( $card )
Remove
$card
from the list of cards owned by the player to be shown.visibility_toggle()
Request window to be hidden / shown depending on its previous state.
SEE ALSO
AUTHOR
Jerome Quelin
COPYRIGHT AND LICENSE
This software is Copyright (c) 2008 by Jerome Quelin.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007