void RegionTextureControl::onMouseButtonClick(const MyGUI::IntPoint& _point) { mCoordValue.left = _point.left - (mCoordValue.width / 2); mCoordValue.top = _point.top - (mCoordValue.height / 2); updateFromCoordValue(); }
void RegionTextureControl::CommandSizeBottom(const MyGUI::UString& _commandName, bool& _result) { if (!checkCommand()) return; mCoordValue.height ++; updateFromCoordValue(); _result = true; }
void RegionTextureControl::CommandSizeLeft(const MyGUI::UString& _commandName, bool& _result) { if (!checkCommand()) return; mCoordValue.width --; updateFromCoordValue(); _result = true; }
void RegionTextureControl::CommandGridSizeBottom(const MyGUI::UString& _commandName, bool& _result) { if (!checkCommand()) return; mCoordValue.height = Grid::getInstance().toGrid(mCoordValue.bottom(), Grid::Next) - mCoordValue.top; updateFromCoordValue(); _result = true; }
void RegionTextureControl::CommandGridSizeRight(const MyGUI::UString& _commandName, bool& _result) { if (!checkCommand()) return; mCoordValue.width = Grid::getInstance().toGrid(mCoordValue.right(), Grid::Next) - mCoordValue.left; updateFromCoordValue(); _result = true; }
void RegionTextureControl::CommandGridMoveTop(const MyGUI::UString& _commandName, bool& _result) { if (!checkCommand()) return; mCoordValue.top = Grid::getInstance().toGrid(mCoordValue.top, Grid::Previous); updateFromCoordValue(); _result = true; }
void WorkspaceControl::Command_SizeBottom(const MyGUI::UString& _commandName, bool& _result) { if (!checkCommand()) return; if (!mMoveableWidget) return; mCoordValue.height ++; updateFromCoordValue(); UndoManager::getInstance().addValue(PR_KEY_POSITION); _result = true; }
void WorkspaceControl::Command_GridSizeRight(const MyGUI::UString& _commandName, bool& _result) { if (!checkCommand()) return; if (!mMoveableWidget) return; mCoordValue.width = toGrid(mCoordValue.right() + mGridStep) - mCoordValue.left; updateFromCoordValue(); UndoManager::getInstance().addValue(PR_KEY_POSITION); _result = true; }
void WorkspaceControl::Command_GridMoveTop(const MyGUI::UString& _commandName, bool& _result) { if (!checkCommand()) return; if (!mMoveableWidget) return; mCoordValue.top = toGrid(--mCoordValue.top); updateFromCoordValue(); UndoManager::getInstance().addValue(PR_KEY_POSITION); _result = true; }