Skip to content

Commit

Permalink
Highlight entities at weird location in list
Browse files Browse the repository at this point in the history
  • Loading branch information
dextercd committed Dec 6, 2023
1 parent b887205 commit aff6de4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions component-explorer/entity_list.lua
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@ function entity_list.show()
imgui.Text(file)
imgui.TableNextColumn()
open_entity_small_button(entity)

-- Highlight entities at weird locations
local x, y = EntityGetTransform(entity)
if x ~= x or y ~= y then
imgui.TableSetBgColor(imgui.TableBgTarget.RowBg1, 0, 0, 0.455, 1)
elseif x == 1/0 or y == 1/0 or x == -1/0 or y == -1/0 then
imgui.TableSetBgColor(imgui.TableBgTarget.RowBg1, 0.455, 0, 0, 1)
end
end
end

Expand Down

0 comments on commit aff6de4

Please sign in to comment.