actionkeys

This commit is contained in:
kremsy 2014-01-12 01:18:04 +01:00 committed by Steffen Schröder
parent 345368df39
commit b8c22a3270

View File

@ -221,6 +221,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
* @param array $callback * @param array $callback
*/ */
public function handleManialinkPageAnswer(array $callback) { public function handleManialinkPageAnswer(array $callback) {
var_dump($callback);
//TODO Fx buttons //TODO Fx buttons
$actionId = $callback[1][2]; $actionId = $callback[1][2];
@ -489,6 +490,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
$quad->setSubStyle($quad::SUBSTYLE_BgPlayerCardBig); $quad->setSubStyle($quad::SUBSTYLE_BgPlayerCardBig);
$quad->setSize(5, 5); $quad->setSize(5, 5);
$quad->setAction(self::ACTION_NEGATIVE_VOTE); $quad->setAction(self::ACTION_NEGATIVE_VOTE);
$quad->setActionKey($quad::ACTIONKEY_F5);
$label = new Label_Button(); $label = new Label_Button();
$frame->add($label); $frame->add($label);
@ -499,18 +501,19 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
$label->setTextSize(1); $label->setTextSize(1);
$label->setSize(3, 3); $label->setSize(3, 3);
$label->setTextColor("F00"); $label->setTextColor("F00");
$label->setText("F1"); $label->setText("F5");
$quad = clone $quad; $quad = clone $quad;
$frame->add($quad); $frame->add($quad);
$quad->setX($width / 2 - 4); $quad->setX($width / 2 - 4);
$quad->setAction(self::ACTION_POSITIVE_VOTE); $quad->setAction(self::ACTION_POSITIVE_VOTE);
$quad->setActionKey($quad::ACTIONKEY_F6);
$label = clone $label; $label = clone $label;
$frame->add($label); $frame->add($label);
$label->setX($width / 2 - 4); $label->setX($width / 2 - 4);
$label->setTextColor("0F0"); $label->setTextColor("0F0");
$label->setText("F2"); $label->setText("F6");
// Send manialink // Send manialink
$manialinkText = $maniaLink->render()->saveXML(); $manialinkText = $maniaLink->render()->saveXML();