You have no idea what we’re talking about.
On another note, I kinda got it to work. You must :AddSubMenu on your DMenu without adding any options to it, then you have to overwrite the OnCursorEntered function of the item that has the little side-arrow on it (which are stored in and accessed by dmenu.Panels) to
- Execute the old OnCursorEntered function
- Create a DTextEntry without a parent (you can parent it if you want to but it doesn’t make a difference)
- MakePopup the DTextEntry
- Set it’s position in screen coordinates by using :LocalToScreen on self
And then overwrite the OnCursorExited function of the item to
And remember, what is returned by dmenu:AddSubMenu is the DMenu that is opened when you mouse over the main dmenu’s new submenu that you have just created. It is not the entry that has the little arrow on it, and it is not what you want. You have to access the thing by going through the member table Panels of the dermamenu, which stores all the dmenu’s items.
So it’s kinda cheating because you’re not really adding an DTextEntry to a DMenu, you’re just overwriting the onmouseover to open one. But if you do add it as any items to the new SubMenu, it will draw on top of the DTextEntry even if you set it as the parent, etc. which is a wierd bug. dtextentry:SetZPos(9999) doesn’t help either.
I hope this helps somebody in the future.
Actually, if you want to be able to move your mouse over the dtextentry without it closing, instead of overwriting the OnCursorExited function to close the DTextEntry, make a method on the DTextEntry called Hide() and in Hide, do
and then, in OnCursorEntered, as the last thing you do, do