VeTaL Posted July 4, 2011 Share Posted July 4, 2011 For now, i'm using 2 GUIs: 1. ImGui (taken from raycast lib, and, to be correct, from Chris Paulson's Game ) pros: its extremely simple, fast and code-driven. negs: it doesnt support skins, so it cant be end-user UI add: in combination with _raise/_event system (i tried to find, where i got it, but wasn't scusessed), it makes creation of debug panels extremely simple: 1) its needed to inherit from GameObject: PlayerManager : public GameObject 2) its needed to define 3 virtual functions virtual void UpdateEvent( float gameLoopTime); virtual void RenderEvent( float gameLoopTime); virtual void RenderGuiEvent( float gameLoopTime); 3) its needed to define RenderGuiEvent, which would be called every frame while drawing gui void PlayerManager::RenderGuiEvent( float gameLoopTime ) { imguiBeginScrollArea("Player debug", 800, 10, 200, 200, &_debugScroll); if (_controller) { _playerPos = EntityPosition(_controller); sprintf(_debugBuf, "playerX: %f", _playerPos.X ); imguiValue( _debugBuf ); sprintf(_debugBuf, "playerY: %f", _playerPos.Y ); imguiValue( _debugBuf ); sprintf(_debugBuf, "playerZ: %f", _playerPos.Z ); imguiValue( _debugBuf ); imguiSeparator(); } imguiEndScrollArea(); } and thats all! 2. CeGui (i already had realization, but also nice tutorial was found here) pros: it supports skins and layout editor cons: its not so simple and flexible, it contains its own realisation of XML-parser, input and a lot of garbage add: after some additional work (well, you can just close your eyes at the structure of CEGUI and use it as "black box"), you can get nice UI for end-user. What are you thinking about it? Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
franck22000 Posted July 4, 2011 Share Posted July 4, 2011 Thanks for the infos Pitty that you were not able to get MyGUI working it seem to be a good gui lib... Quote You guys are going to be the death of me. Josh Link to comment Share on other sites More sharing options...
VeTaL Posted July 4, 2011 Author Share Posted July 4, 2011 Yep, there were some problems with rendering Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.