| 52 | } |
| 53 | |
| 54 | ImVec2 cocos_to_vec2(const ax::Point& a) |
| 55 | { |
| 56 | const auto size = ImGui::GetMainViewport()->Size; |
| 57 | const auto win_size = ax::Director::getInstance()->getWinSize(); |
| 58 | return {a.x / win_size.width * size.x, (1.f - a.y / win_size.height) * size.y}; |
| 59 | } |
| 60 | |
| 61 | void highlight(ax::Node* node, bool selected) |
| 62 | { |