@@ -8,7 +8,6 @@ |
||
| 8 | 8 | use eXpansion\Framework\Core\Model\Gui\WidgetFactoryContext; |
| 9 | 9 | use eXpansion\Framework\Core\Plugins\Gui\WidgetFactory; |
| 10 | 10 | use eXpansion\Framework\Gui\Builders\WidgetBackground; |
| 11 | -use eXpansion\Framework\Gui\Components\uiButton; |
|
| 12 | 11 | use eXpansion\Framework\Gui\Components\uiLabel; |
| 13 | 12 | use eXpansion\Framework\Gui\Ui\Factory; |
| 14 | 13 | use FML\Controls\Frame; |
@@ -115,6 +115,10 @@ discard block |
||
| 115 | 115 | $manialink->addChild($line3); |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | + /** |
|
| 119 | + * @param string $text |
|
| 120 | + * @param string $color |
|
| 121 | + */ |
|
| 118 | 122 | private function createLabel($text, $color) |
| 119 | 123 | { |
| 120 | 124 | return $this->uiFactory->createLabel($text, UiLabel::TYPE_NORMAL)->setTranslate(false) |
@@ -123,6 +127,9 @@ discard block |
||
| 123 | 127 | } |
| 124 | 128 | |
| 125 | 129 | |
| 130 | + /** |
|
| 131 | + * @param Record|null $record |
|
| 132 | + */ |
|
| 126 | 133 | public function setLocalRecord($record) |
| 127 | 134 | { |
| 128 | 135 | if ($record instanceof Record) { |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | use eXpansion\Framework\Core\Model\Gui\Widget; |
| 9 | 9 | use eXpansion\Framework\Core\Model\Gui\WidgetFactoryContext; |
| 10 | 10 | use eXpansion\Framework\Core\Plugins\Gui\WidgetFactory; |
| 11 | -use eXpansion\Framework\Gui\Components\uiLabel; |
|
| 12 | 11 | |
| 13 | 12 | class BestRecordsWidgetFactory extends WidgetFactory |
| 14 | 13 | { |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | ); |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - $uniqueId = uniqid('exp_',true); |
|
| 64 | + $uniqueId = uniqid('exp_', true); |
|
| 65 | 65 | $this->checkVariable = new Variable('check', 'Text', 'This', "\"$uniqueId\""); |
| 66 | 66 | $this->checkOldVariable = new Variable('check_old', 'Text', 'Page', "\"$uniqueId\""); |
| 67 | 67 | } |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | { |
| 77 | 77 | if ($this->variables[$variable]->getValue() != $newValue) { |
| 78 | 78 | $this->variables[$variable]->setValue($newValue); |
| 79 | - $uniqueId = '"' . uniqid('exp_', true) . '"'; |
|
| 79 | + $uniqueId = '"'.uniqid('exp_', true).'"'; |
|
| 80 | 80 | $this->checkVariable->setValue($uniqueId); |
| 81 | 81 | |
| 82 | 82 | if (is_null($this->queuedForUpdate)) { |
@@ -135,16 +135,16 @@ discard block |
||
| 135 | 135 | { |
| 136 | 136 | $scriptContent = ''; |
| 137 | 137 | foreach ($this->variables as $variable) { |
| 138 | - $scriptContent .= $variable->getScriptDeclaration() . "\n"; |
|
| 138 | + $scriptContent .= $variable->getScriptDeclaration()."\n"; |
|
| 139 | 139 | if ($defaultValues) { |
| 140 | - $scriptContent .= $variable->getScriptValueSet() . "\n"; |
|
| 140 | + $scriptContent .= $variable->getScriptValueSet()."\n"; |
|
| 141 | 141 | } |
| 142 | 142 | } |
| 143 | - $scriptContent .= $this->checkVariable->getScriptDeclaration() . "\n"; |
|
| 144 | - $scriptContent .= $this->checkOldVariable->getScriptDeclaration() . "\n"; |
|
| 143 | + $scriptContent .= $this->checkVariable->getScriptDeclaration()."\n"; |
|
| 144 | + $scriptContent .= $this->checkOldVariable->getScriptDeclaration()."\n"; |
|
| 145 | 145 | if ($defaultValues) { |
| 146 | - $scriptContent .= $this->checkVariable->getScriptValueSet() . "\n"; |
|
| 147 | - $scriptContent .= $this->checkOldVariable->getVariableName() . ' = "";'; |
|
| 146 | + $scriptContent .= $this->checkVariable->getScriptValueSet()."\n"; |
|
| 147 | + $scriptContent .= $this->checkOldVariable->getVariableName().' = "";'; |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | return $scriptContent; |
@@ -83,8 +83,8 @@ |
||
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - $this->lblRatingsYes->setText('$0d0 $fff' . $yes); |
|
| 87 | - $this->lblRatingsNo->setText('$d00 $fff' . $no); |
|
| 86 | + $this->lblRatingsYes->setText('$0d0 $fff'.$yes); |
|
| 87 | + $this->lblRatingsNo->setText('$d00 $fff'.$no); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | /** |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | $line = $this->uiFactory->createLayoutLine(0, -4.45, [], 0.5); |
| 88 | 88 | $line->setAlign("left", "top"); |
| 89 | 89 | $manialink->addChild($line); |
| 90 | - $div = ((60 - 1)/ 3); |
|
| 90 | + $div = ((60 - 1) / 3); |
|
| 91 | 91 | |
| 92 | 92 | $lbl = $this->uiFactory->createLabel("0 / 0", uiLabel::TYPE_NORMAL, "Players"); |
| 93 | 93 | $lbl->setTextPrefix(" |