@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | protected function calculateContentWidth() : void |
| 314 | 314 | { |
| 315 | 315 | $this->contentWidth = $this->width |
| 316 | - - ($this->paddingLeftRight * 2) |
|
| 316 | + - ($this->paddingLeftRight*2) |
|
| 317 | 317 | - ($this->borderRightWidth + $this->borderLeftWidth); |
| 318 | 318 | } |
| 319 | 319 | |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | public function setMarginAuto() : self |
| 457 | 457 | { |
| 458 | 458 | $this->marginAuto = true; |
| 459 | - $this->margin = floor(($this->terminal->getWidth() - $this->width) / 2); |
|
| 459 | + $this->margin = floor(($this->terminal->getWidth() - $this->width)/2); |
|
| 460 | 460 | |
| 461 | 461 | $this->generateBorderRows(); |
| 462 | 462 | $this->generatePaddingTopBottomRows(); |
@@ -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->getPaddingLeftRight() * 2)) / 2; |
|
| 77 | - $widthHalfLength = ceil($parentStyle->getWidth() / 2 + $parentStyle->getMargin()); |
|
| 76 | + $dialogueHalfLength = (mb_strlen($this->text) + ($this->style->getPaddingLeftRight()*2))/2; |
|
| 77 | + $widthHalfLength = ceil($parentStyle->getWidth()/2 + $parentStyle->getMargin()); |
|
| 78 | 78 | $this->x = $widthHalfLength - $dialogueHalfLength; |
| 79 | 79 | } |
| 80 | 80 | |