@@ -302,7 +302,7 @@ |
||
302 | 302 | public function setMargin(int $margin) : self |
303 | 303 | { |
304 | 304 | if ($this->margin === -1) { |
305 | - $this->margin = floor(($this->terminal->getWidth() - $this->width) / 2); |
|
305 | + $this->margin = floor(($this->terminal->getWidth() - $this->width)/2); |
|
306 | 306 | } else { |
307 | 307 | $this->margin = $margin; |
308 | 308 | } |
@@ -69,12 +69,12 @@ |
||
69 | 69 | { |
70 | 70 | //y |
71 | 71 | $textLines = count(explode("\n", $this->text)) + 2; |
72 | - $this->y = ceil($this->parentMenu->getCurrentFrame()->count() / 2) - ceil($textLines / 2) + 1; |
|
72 | + $this->y = ceil($this->parentMenu->getCurrentFrame()->count()/2) - ceil($textLines/2) + 1; |
|
73 | 73 | |
74 | 74 | //x |
75 | 75 | $parentStyle = $this->parentMenu->getStyle(); |
76 | - $dialogueHalfLength = (mb_strlen($this->text) + ($this->style->getPadding() * 2)) / 2; |
|
77 | - $widthHalfLength = ceil($parentStyle->getWidth() / 2 + $parentStyle->getMargin()); |
|
76 | + $dialogueHalfLength = (mb_strlen($this->text) + ($this->style->getPadding()*2))/2; |
|
77 | + $widthHalfLength = ceil($parentStyle->getWidth()/2 + $parentStyle->getMargin()); |
|
78 | 78 | $this->x = $widthHalfLength - $dialogueHalfLength; |
79 | 79 | } |
80 | 80 |