CEGUI

CEGUI: CELayoutEditor http://haorui215.javaeye.com/blog/344287

 

 

http://wiki.ogrecn.com/wiki/index.php?title=%E6%96%87%E6%A1%A3:%E6%95%99%E7%A8%8B:%E4%B8%AD%E7%BA%A7%E6%95%99%E7%A8%8B:%E4%B8%AD%E7%BA%A7%E6%95%99%E7%A8%8B%E4%B9%9D

 

 

菜单

http://www.cppblog.com/alienbox/articles/97728.html

 

自己的程序里菜单添加  先用CELayoutEditor做好menubar 和menuIterm 在在程序中加如下代码,添加下拉按钮

CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton();
  //Terrain Menu
  CEGUI::MenuItem* MeTerrainItem = (CEGUI::MenuItem*)wmgr.getWindow("MeTerrain");

  CEGUI::PopupMenu* TerrainPop = (CEGUI::PopupMenu *)wmgr.createWindow("TaharezLook/PopupMenu","Te_popup_menu");
  MeTerrainItem->addChildWindow(TerrainPop);

  CEGUI::MenuItem* TerrainLoadItem = (CEGUI::MenuItem*)wmgr.createWindow("TaharezLook/MenuItem","TeLoadItem");
  TerrainLoadItem->setText("Load New Terrain ...");
  TerrainPop->addChildWindow(TerrainLoadItem);
  CEGUI::MenuItem* TerrainSaveItem = (CEGUI::MenuItem*)wmgr.createWindow("TaharezLook/MenuItem","TeSaveItem");
  TerrainSaveItem->setText("Save Terrain");
  TerrainPop->addChildWindow(TerrainSaveItem);
  CEGUI::MenuItem* ExitItem = (CEGUI::MenuItem*)wmgr.createWindow("TaharezLook/MenuItem","ExitItem");
  ExitItem->setText("Exit");
  TerrainPop->addChildWindow(ExitItem);
  //Flying Corridor Menu
  CEGUI::MenuItem* MeCorridorItem = (CEGUI::MenuItem*)wmgr.getWindow("MeCorridor");

  CEGUI::PopupMenu* CorridorPop = (CEGUI::PopupMenu *)wmgr.createWindow("TaharezLook/PopupMenu","Corridor_popup_menu");
  MeCorridorItem->addChildWindow(CorridorPop);
  CEGUI::MenuItem* CorridorAddItem = (CEGUI::MenuItem*)wmgr.createWindow("TaharezLook/MenuItem","CorridorAddItem");
  CorridorAddItem->setText("Corridor Add ...  ");
  CorridorPop->addChildWindow(CorridorAddItem);
 

你可能感兴趣的:(menu)