c# - Attach a Context Menu to a GUI.Window -


i have custom window has multiple gui.window's inside of it. can create context menu main window , works. when try create context menus gui.window doesn't work. when right click on window starts drag around main window.

here have list stores window information:

// stores list of windows list<storyboardwindow> windows = new list<storyboardwindow>(); 

then here loop through windows , call drawnodewindow:

// draws windows screen void ongui() {     (int = 0; < windows.count; i++) {         windows[i].window = gui.window(i, windows[i].window, drawnodewindow, windows[i].windowtitle);     } } 

i have method creates genericmenu window, doesn't work when right click on window.

// supposed create context menu window void drawnodewindow(int id) {     event currentevent = event.current;     if (currentevent.type == eventtype.contextclick){         genericmenu menu = new genericmenu();         menu.additem(new guicontent("remove"), false, removedialogwindow, id);         menu.showascontext();         currentevent.use();     }     gui.dragwindow(); } 

this class stores information:

// data each window public class storyboardwindow {     public enum windowtype { characterdialog, charactersdialog }     public windowtype windowtype;     public string windowtitle;     public rect window; } 

so, have differently? can this? doing incorrectly?

here screenshot:

preview


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -