Fixed DImage erroring when dragging and dropping. #1242

Merged
merged 1 commit into from Sep 14, 2016

Projects

None yet

2 participants

@sannysc
Contributor
sannysc commented Sep 14, 2016

DImage errors when being dragged.

local frame = vgui.Create("DFrame")
local material = "materials/spawnicons/models/weapons/w_pist_deagle_64.png"

frame:SetSize(200, 200)
frame:Center()

local image = vgui.Create("DImage", frame)
image:Dock(FILL)
image:SetImage(material)
image:SetMouseInputEnabled(true)
image:Droppable("test")

frame:MakePopup()

[ERROR] lua/vgui/dimage.lua:266: bad argument #4 to 'DrawTexturedRect' (number expected, got nil)

  1. DrawTexturedRect - [C]:-1
    1. PaintAt - lua/vgui/dimage.lua:266
    2. v - lua/includes/extensions/client/panel/dragdrop.lua:269
      1. unknown - lua/includes/modules/hook.lua:84
@sannysc sannysc Fixed DImage erroring when dragging and dropping.
DImage errors when being dragged.
```lua
local frame = vgui.Create("DFrame")
local material = "materials/spawnicons/models/weapons/w_pist_deagle_64.png"

frame:SetSize(200, 200)
frame:Center()

local image = vgui.Create("DImage", frame)
image:Dock(FILL)
image:SetImage(material)
image:SetMouseInputEnabled(true)
image:Droppable("test")

frame:MakePopup()
```

>[ERROR] lua/vgui/dimage.lua:266: bad argument #4 to 'DrawTexturedRect' (number expected, got nil)
  1. DrawTexturedRect - [C]:-1
   2. PaintAt - lua/vgui/dimage.lua:266
    3. v - lua/includes/extensions/client/panel/dragdrop.lua:269
     4. unknown - lua/includes/modules/hook.lua:84
5086f0a
@robotboy655 robotboy655 merged commit e1997b3 into garrynewman:master Sep 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment