I'm in a need of creating a mini-map for my game. I found this interesting article on the web about creating a mini-map using CEGUI in Ogre (http://www.gamedboy.com/modules.php?name=Content&pa=showpage&pid=10
), but I am not sure how to "translate" it into MyGUI. I guess MyGUI allows for the creation of mini-maps... or not?
Could someone help me out here? Thanks a lot!
You should use RenderBox widget for it. Code is almost same, but you don't need to create texture manually and last (GUI related) part is only one line
MyGUI::RenderBoxPtr minimap = MyGUI::Gui::getInstance().createWidget<MyGUI::RenderBox>("RenderBox", IntCoord(50, 50, 300, 300), Align::Default, "Main");
Ogre::Radian fieldOfView = _camera->getFOVy();
float height = _sceneLength/2 / Ogre::Math::Sin(fieldOfView / 2);
Vector3 cameraPosition = Vector3(_sceneLength/2,_sceneWidth/2, height);
Vector3 lookAt = Vector3(_sceneLength/2,_sceneWidth/2, 0);
//create a minimap camera, use the same settings as main camera
//AspectRatio(1) is for a square minimap
Cool! Thanks a lot, I'll check it out
It doesn't seem to work if I put it that way. The map keeps reproducing itself recursively...