imgui-node-editor icon indicating copy to clipboard operation
imgui-node-editor copied to clipboard

Pictures and Text in Combobox for a value editor

Open SadE54 opened this issue 5 years ago • 3 comments
trafficstars

Hello For a project I need to place a combobox as a value editor , and for each item to display a picture with a describing text. Is it currently possible to set up this feature ?

SadE54 avatar Dec 30 '19 06:12 SadE54

Yes, please see #48 how you can make combobox inside nodes. It this sufficient?

thedmd avatar Dec 31 '19 01:12 thedmd

I will try with the suggested solution ! But what 's the current problem with comboboxes in node editor ?

SadE54 avatar Dec 31 '19 09:12 SadE54

This is mostly problematic because content of node editor is drawn on canvas which can be moved or zoomed. Collapsed ComboBox is fine, but when you click it popup with items will be shown not next to cursor but in some "random" place. Cursor position is in canvas coordinates, before showing popup it should be converted to screen coordinates. When ComboBox return true popup is already positioned and sized according to canvas coordinates but drawn in screen coordinates. There is no place where coordinate conversion can be injected.

thedmd avatar Dec 31 '19 09:12 thedmd