fml toggle update
This commit is contained in:
parent
3c784505d2
commit
cd475c6508
@ -205,7 +205,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener {
|
|||||||
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
||||||
$backgroundQuad->setSize(count($this->adminMenuItems) * $itemSize * 1.15 + 2, $itemSize * $itemMarginFactorY);
|
$backgroundQuad->setSize(count($this->adminMenuItems) * $itemSize * 1.15 + 2, $itemSize * $itemMarginFactorY);
|
||||||
|
|
||||||
$script->addTooltip($itemQuad, $popoutFrame, Script::OPTION_TOOLTIP_ONCLICK);
|
$script->addToggle($itemQuad, $popoutFrame);
|
||||||
|
|
||||||
// Add items
|
// Add items
|
||||||
$x = -1;
|
$x = -1;
|
||||||
@ -273,7 +273,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener {
|
|||||||
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
||||||
$backgroundQuad->setSize(count($this->playerMenuItems) * $itemSize * 1.15 + 2, $itemSize * $itemMarginFactorY);
|
$backgroundQuad->setSize(count($this->playerMenuItems) * $itemSize * 1.15 + 2, $itemSize * $itemMarginFactorY);
|
||||||
|
|
||||||
$script->addTooltip($itemQuad, $popoutFrame, Script::OPTION_TOOLTIP_ONCLICK);
|
$script->addToggle($itemQuad, $popoutFrame);
|
||||||
|
|
||||||
// Add items
|
// Add items
|
||||||
$x = -1;
|
$x = -1;
|
||||||
|
@ -297,6 +297,12 @@ class Script {
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
$toggleControl->checkId();
|
$toggleControl->checkId();
|
||||||
|
if ($mode == self::CLASS_HIDE) {
|
||||||
|
$toggleControl->setVisible(true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$toggleControl->setVisible(false);
|
||||||
|
}
|
||||||
$clickControl->setScriptEvents(true);
|
$clickControl->setScriptEvents(true);
|
||||||
$clickControl->addClass(self::CLASS_TOGGLE);
|
$clickControl->addClass(self::CLASS_TOGGLE);
|
||||||
$clickControl->addClass($mode);
|
$clickControl->addClass($mode);
|
||||||
|
@ -191,8 +191,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
$itemSize = $width;
|
$itemSize = $width;
|
||||||
|
|
||||||
$maniaLink = new ManiaLink(self::MLID_DONATE_WIDGET);
|
$maniaLink = new ManiaLink(self::MLID_DONATE_WIDGET);
|
||||||
$script = new Script();
|
$script = $maniaLink->getScript();
|
||||||
$maniaLink->setScript($script);
|
|
||||||
|
|
||||||
// Donate Menu Icon Frame
|
// Donate Menu Icon Frame
|
||||||
$frame = new Frame();
|
$frame = new Frame();
|
||||||
@ -230,7 +229,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
|
|
||||||
$popoutFrame->add($quad);
|
$popoutFrame->add($quad);
|
||||||
|
|
||||||
$script->addTooltip($itemQuad, $popoutFrame, Script::OPTION_TOOLTIP_ONCLICK);
|
$script->addToggle($itemQuad, $popoutFrame);
|
||||||
|
|
||||||
// Description Label
|
// Description Label
|
||||||
$descriptionFrame = new Frame();
|
$descriptionFrame = new Frame();
|
||||||
|
Loading…
Reference in New Issue
Block a user