0x004CE367 tool (al) widgetIndex (dx) w (esi)
| 59 | // widgetIndex (dx) |
| 60 | // w (esi) |
| 61 | bool toolSet(const Ui::Window& w, int16_t widgetIndex, CursorId cursorId) |
| 62 | { |
| 63 | if (Input::hasFlag(Input::Flags::toolActive)) |
| 64 | { |
| 65 | if (w.type == _toolWindowType && w.number == _toolWindowNumber && widgetIndex == _toolWidgetIndex) |
| 66 | { |
| 67 | toolCancel(); |
| 68 | return false; |
| 69 | } |
| 70 | else |
| 71 | { |
| 72 | toolCancel(); |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | Input::setFlag(Input::Flags::toolActive); |
| 77 | Input::resetFlag(Input::Flags::flag6); |
| 78 | ToolManager::setToolCursor(cursorId); |
| 79 | ToolManager::setToolWindowType(w.type); |
| 80 | ToolManager::setToolWindowNumber(w.number); |
| 81 | ToolManager::setToolWidgetIndex(widgetIndex); |
| 82 | return true; |
| 83 | } |
| 84 | |
| 85 | // 0x004CE3D6 |
| 86 | void toolCancel() |