Made widgetposition changable in the settings
This commit is contained in:
parent
5ae3e43097
commit
8488ff4931
@ -35,6 +35,8 @@ class QueuePlugin implements CallbackListener, CommandListener, ManialinkPageAns
|
|||||||
const ML_REMOVEFROMQUEUE = 'Queue.Remove';
|
const ML_REMOVEFROMQUEUE = 'Queue.Remove';
|
||||||
|
|
||||||
const QUEUE_MAX = 'Maximum number in the queue';
|
const QUEUE_MAX = 'Maximum number in the queue';
|
||||||
|
const QUEUE_WIDGET_POS_X = 'X position of the widget';
|
||||||
|
const QUEUE_WIDGET_POS_Y = 'Y position of the widget';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private properties
|
* Private properties
|
||||||
@ -72,6 +74,8 @@ class QueuePlugin implements CallbackListener, CommandListener, ManialinkPageAns
|
|||||||
$this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ML_REMOVEFROMQUEUE, $this, 'handleManiaLinkAnswerRemove');
|
$this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ML_REMOVEFROMQUEUE, $this, 'handleManiaLinkAnswerRemove');
|
||||||
|
|
||||||
$this->maniaControl->settingManager->initSetting($this, self::QUEUE_MAX, 8);
|
$this->maniaControl->settingManager->initSetting($this, self::QUEUE_MAX, 8);
|
||||||
|
$this->maniaControl->settingManager->initSetting($this, self::QUEUE_WIDGET_POS_X, 0);
|
||||||
|
$this->maniaControl->settingManager->initSetting($this, self::QUEUE_WIDGET_POS_Y, -46);
|
||||||
|
|
||||||
foreach($this->maniaControl->playerManager->getPlayers() as $player) {
|
foreach($this->maniaControl->playerManager->getPlayers() as $player) {
|
||||||
if($player->isSpectator) {
|
if($player->isSpectator) {
|
||||||
@ -355,13 +359,12 @@ class QueuePlugin implements CallbackListener, CommandListener, ManialinkPageAns
|
|||||||
$quadStyle = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowStyle();
|
$quadStyle = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowStyle();
|
||||||
$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowSubStyle();
|
$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowSubStyle();
|
||||||
$max_queue = $this->maniaControl->settingManager->getSetting($this, self::QUEUE_MAX);
|
$max_queue = $this->maniaControl->settingManager->getSetting($this, self::QUEUE_MAX);
|
||||||
//TODO position setting
|
|
||||||
|
|
||||||
// Main frame
|
// Main frame
|
||||||
$frame = new Frame();
|
$frame = new Frame();
|
||||||
$maniaLink->add($frame);
|
$maniaLink->add($frame);
|
||||||
$frame->setSize(60, 6);
|
$frame->setSize(60, 6);
|
||||||
$frame->setPosition(0, -46, 0);
|
$frame->setPosition($this->maniaControl->settingManager->getSetting($this, self::QUEUE_WIDGET_POS_X), $this->maniaControl->settingManager->getSetting($this, self::QUEUE_WIDGET_POS_Y), 0);
|
||||||
|
|
||||||
// Background
|
// Background
|
||||||
$backgroundQuad = new Quad();
|
$backgroundQuad = new Quad();
|
||||||
@ -448,8 +451,7 @@ class QueuePlugin implements CallbackListener, CommandListener, ManialinkPageAns
|
|||||||
$frame = new Frame();
|
$frame = new Frame();
|
||||||
$maniaLink->add($frame);
|
$maniaLink->add($frame);
|
||||||
$frame->setSize(60, 6);
|
$frame->setSize(60, 6);
|
||||||
$frame->setPosition(0, -46, 0);
|
$frame->setPosition($this->maniaControl->settingManager->getSetting($this, self::QUEUE_WIDGET_POS_X), $this->maniaControl->settingManager->getSetting($this, self::QUEUE_WIDGET_POS_Y), 0);
|
||||||
//TODO position setting
|
|
||||||
|
|
||||||
// Background
|
// Background
|
||||||
$backgroundQuad = new Quad();
|
$backgroundQuad = new Quad();
|
||||||
|
Loading…
Reference in New Issue
Block a user