Skip to content

Commit

Permalink
Small buttons for entity teleport feature
Browse files Browse the repository at this point in the history
  • Loading branch information
dextercd committed Dec 7, 2023
1 parent fb3ff00 commit 2bf7d6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions component-explorer/entity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ local function show_entity(entity_id, data)

imgui.Text("Teleport:")
imgui.SameLine()
if imgui.Button("This to player") then
if imgui.SmallButton("This to player") then
local px, py = EntityGetTransform(player)
EntityApplyTransform(entity_id, px, py, rotation, scale_x, scale_y)
end

imgui.SameLine()
if imgui.Button("Player to this") then
if imgui.SmallButton("Player to this") then
local _, _, pr, psx, psy = EntityGetTransform(player)
EntityApplyTransform(player, x, y, pr, psx, psy)
end
Expand Down

0 comments on commit 2bf7d6a

Please sign in to comment.