net.sf.magicproject.action
Class Input

java.lang.Object
  extended by net.sf.magicproject.action.MAction
      extended by net.sf.magicproject.action.UserAction
          extended by net.sf.magicproject.action.MessagingAction
              extended by net.sf.magicproject.action.Input
All Implemented Interfaces:
BackgroundMessaging, InitAction, Replayable, StandardAction

public class Input
extends MessagingAction

Display a message box with a customizable ok button and text. It's possible to use the multi-language ability for text and button label if string starts with the '$' character. In case of type is 'yesno', the answer is 0 for "YES", and 1 for "NO". To test the answer of this question, test the register named 'stack' at the index '0'.

Since:
0.71, 0.82 support controller
Author:
Fabrice Daugan

Method Summary
 Actiontype getIdAction()
          Return the index of this action.
 boolean play(ContextEventListener context, Ability ability)
          Generate event associated to this action.
 java.lang.String toString(Ability ability)
          String representation of this action.
 
Methods inherited from class net.sf.magicproject.action.MessagingAction
finishedMessage, init, replay, replayAction
 
Methods inherited from class net.sf.magicproject.action.UserAction
getActionName, manaNeeded, toHtmlString, toHtmlString
 
Methods inherited from class net.sf.magicproject.action.MAction
equal, parseTest, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getIdAction

public final Actiontype getIdAction()
Description copied from class: MAction
Return the index of this action. As default, this is a zero id

Specified by:
getIdAction in class UserAction
Returns:
the index of this action.
See Also:
Actiontype

play

public boolean play(ContextEventListener context,
                    Ability ability)
Description copied from interface: StandardAction
Generate event associated to this action. Only one or several events are generated and may be collected by event listeners. Then play this action

Specified by:
play in interface StandardAction
Specified by:
play in class MessagingAction
Parameters:
context - is the context attached to this action.
ability - is the ability owning this test. The card component of this ability should correspond to the card owning this test too.
Returns:
true if the stack can be resolved just after this call.

toString

public java.lang.String toString(Ability ability)
Description copied from class: MAction
String representation of this action.

Specified by:
toString in class UserAction
Parameters:
ability - is the ability owning this test. The card component of this ability should correspond to the card owning this test too.
Returns:
action name.
See Also:
Object.toString()


Copyright © 2003-2007 Magic-Project. All Rights Reserved.