Yeah, I was just wondering if there was a significant difference in ressources between a manialink displayed on screen or a message sent in chat. I guess it's minor.
I'm struggling to get a button dynamic.
I'm sending this manialink onPlayerConnect, a simple text box with an OK button
Code: Select all
$xml = '<manialink version="1" id="3121120007">';
$xml .= '<frame posn="-20 10 0">';
$xml .= '<quad posn="16 -10 0" sizen="220 36" valign="center" halign="center" style="Bgs1" substyle="BgWindow3"/>';
$xml .= '<label posn="18 1.5 1" size="50 10" scale="0.8" valign="left" halign="center" style="TextInfoMedium" substyle="" text="'.$texte.'"/>';
$xml .= '<label posn="18 -18.5 1" scale="1.2" valign="center" halign="center" style="CardButtonSmall" text="'.$bouton.'" action="onconnectOK"/>';
$xml .= '</frame>';
$xml .= '</manialink>';
$aseco->sendManialink($xml, $logj, 0, false);
I put an action property on the label button as you see, so I expect to call it once it's on onPlayerManialinkPageAnswer($aseco, $login, $params), but I don't know how it's stored in $params
Tried something like :
Code: Select all
public function za_onPlayerManialinkPageAnswer($aseco, $login, $params) {
if ($params['action'] == 'onconnectOK') {
$xml = '<manialink version="1" id="3121120007">';
$xml .= '</manialink>';
$aseco->sendManialink($xml, $login, 0, false);
}
}
But well, my $params['action'] is a speculation

, my condition is never true. Didn't find how I could dump this $params to know more.
As you can see I just want to make the whole manialink empty and disappear on click.