fix an issue that wrong cursor is displayed at button of Sequencer's custom item
This commit is contained in:
parent
0f5e3c6246
commit
ba0ef29e64
@ -338,6 +338,8 @@ void Timeline::UpdateXGrid() noexcept {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
void Timeline::HandleGrip(Item item, float off, Action ac, Action acdone, ImGuiMouseCursor cur) noexcept {
|
void Timeline::HandleGrip(Item item, float off, Action ac, Action acdone, ImGuiMouseCursor cur) noexcept {
|
||||||
|
auto ctx = ImGui::GetCurrentContext();
|
||||||
|
|
||||||
if (ImGui::IsItemActive()) {
|
if (ImGui::IsItemActive()) {
|
||||||
if (ImGui::IsItemActivated()) {
|
if (ImGui::IsItemActivated()) {
|
||||||
action_ = kSelect;
|
action_ = kSelect;
|
||||||
@ -361,7 +363,7 @@ void Timeline::HandleGrip(Item item, float off, Action ac, Action acdone, ImGuiM
|
|||||||
action_ = acdone;
|
action_ = acdone;
|
||||||
action_target_ = item;
|
action_target_ = item;
|
||||||
}
|
}
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ctx->LastItemData.ID == ctx->HoveredIdPreviousFrame) {
|
||||||
ImGui::SetMouseCursor(cur);
|
ImGui::SetMouseCursor(cur);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user