Allow a sprite to be the drag handle for an empty-widget (or something else that helps?)
Posted: Tue Aug 13, 2019 4:30 pm
I would like the user to be able to click and drag around the hud in https://mods.factorio.com/mod/vehiclehud
The code would look somewhat like this:
The code would look somewhat like this:
Code: Select all
local gui = player.gui.screen.add({
type = "empty-widget",
name = "vehiclehud"
})
...
local face = gui.add{
type = "sprite",
name = "vehiclehud-face",
sprite = "vehiclehud-face-300"
}
face.drag_target = gui