I want to display an identical window to all players.
I know it's possible to do that :
Code: Select all
foreach ($this->storage->players as $login => $player)
{
$window = MyWindow::Create($login);
$window->show();
}
How I can do, please ?
Moderator: NADEO
Code: Select all
foreach ($this->storage->players as $login => $player)
{
$window = MyWindow::Create($login);
$window->show();
}
Code: Select all
$window = MyWindow::Create($login, false);
$window->show();
ThanksThe_Big_Boo wrote:Indeed, you need to use Window::RECIPIENT_ALL
this don't work well. Exemple :The_Big_Boo wrote:Yes, you have to call show() for newcomers. You can even call show($login) with the login of the new player so it won't be sent again to every other players (if the window doesn't need to be refreshed for them).
Code: Select all
show(Window::RECIPIENT_ALL)
Code: Select all
show('p2')
Code: Select all
hide(Window::RECIPIENT_ALL)
Thanks, I found it a few days agoThe_Big_Boo wrote:Indeed, you need to use Window::RECIPIENT_ALL
Users browsing this forum: No registered users and 0 guests