handsomematt / 3d2d-vgui

:eyes: Render and control 2D VGUI in 3D world space for Garry's Mod
MIT License
91 stars 25 forks source link

DComboBox #23

Open chudders1231 opened 6 years ago

chudders1231 commented 6 years ago

Hey matt, This 2D3D VGUI script is perfect for me right now because i need this sort of interaction on a panel im using for entities however i have found that DComboBoxes don't stick to the the parent frame when it is open and the options aren't displayed on the 3D2D panel, instead they throw an error and display on your screen instead. How would this be fixed?

http://prntscr.com/kd27y4

The error:

[ERROR] lua/vgui/dmenu.lua:185: attempt to call field 'PerformLayout' (a nil value)

  1. PerformLayout - lua/vgui/dmenu.lua:185
    1. unknown - lua/vgui/dscrollpanel.lua:14
handsomematt commented 6 years ago

Can you please show the code you're using.

chudders1231 commented 6 years ago

The current code that i am using is on an entity with a 2D3D panel running from it: https://pastebin.com/qeJpzNgX

chudders1231 commented 6 years ago

Now, there isn't an error at all but the combobox still opens up on my screen: http://i.prntscr.com/K6e-EmntQGCf-NkLBauyNQ.png

eggroll-bot commented 4 years ago

I can confirm that this is indeed the case. When DComboBoxes are clicked, the DComboBox will open up on the player's screen and any buttons clicked on the screen will cause the DComboBox to disappear like normal, but will not change the option on the 3D2D panel.