| 1646 | } |
| 1647 | |
| 1648 | void EditBox::updateSelectText() |
| 1649 | { |
| 1650 | if (!mModeStatic) |
| 1651 | { |
| 1652 | InputManager& input = InputManager::getInstance(); |
| 1653 | if ((input.isShiftPressed()) && (mStartSelect != ITEM_NONE)) |
| 1654 | { |
| 1655 | // меняем выделение |
| 1656 | mEndSelect = (size_t)mCursorPosition; |
| 1657 | if (mClientText != nullptr) |
| 1658 | { |
| 1659 | if (mStartSelect > mEndSelect) |
| 1660 | mClientText->setTextSelection(mEndSelect, mStartSelect); |
| 1661 | else |
| 1662 | mClientText->setTextSelection(mStartSelect, mEndSelect); |
| 1663 | } |
| 1664 | } |
| 1665 | else if (mStartSelect != ITEM_NONE) |
| 1666 | { |
| 1667 | // сбрасываем шифт |
| 1668 | mStartSelect = ITEM_NONE; |
| 1669 | if (mClientText != nullptr) |
| 1670 | mClientText->setTextSelection(0, 0); |
| 1671 | } |
| 1672 | } |
| 1673 | |
| 1674 | // пытаемся показать курсор |
| 1675 | updateViewWithCursor(); |
| 1676 | } |
| 1677 | |
| 1678 | void EditBox::setTextAlign(Align _value) |
| 1679 | { |
nothing calls this directly
no test coverage detected