FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Technomage

Pages: [1]
1
Framework development / libRocket Implementation Patch
« on: June 29, 2011, 05:56:34 pm »
I've posted the libRocket patch I was talking about earlier at codepad: http://pastebin.com/N15H8jsZ. In summary, the changes were:
  * Added a new RocketGUIManager class which can be used to implement a libRocket GUI in FIFE. To use, simply create an instance and pass it to FIFE::Engine::setGuiManager (works from Python, too).
  * Added a new demo program, rocket_demo, to demonstrate the new libRocket GUI.
  * Updated the build/<platform>-config.py files to look for RocketCore, RocketControls and RocketDebugger.
  * Modified FIFE::Engine::setGuiManager to automatically register the new GUI manager with the SDL event system and clean up the previous GUI Manager.
  * Modified the Python bindings for FIFE::Engine::setGuiManager so that it automatically assigns ownership of the new GUI Manager to the Engine.
  * Updated the Python GUIChan extensions to utilize the new behavior of the FIFE::Engine::setGuiManager method.
  * Added "castTo" static functions to the Python bindings for GUIChanManager and RocketGUIManager which downcast an IGUIManager pointer from Engine::getGuiManager, allowing Python code to utilize these IGUIManager pointers.

The last couple of commits to fife-0.3.3dev broke my rocket_demo.py code somehow and it raises a RuntimeError when it tries to set the default font for the GuiChanManager. This may have something to do with the fact that I didn't bother to stop GUIChan initialization in ApplicationBase's __init__ method for the demo program, but simply clean up GUIChan and replace it with a RocketGUIManager instance. Regardless, I don't know enough about the changes to debug it so you'll have to take a look.

I couldn't figure out how to interface libRocket with the RenderBackend, specifically to render textures. So I just copied the OpenGL renderer from the libRocket samples "shell" framework. It seems to work fine within fife, though this might not be portable.

I should note that I haven't tested this on Windows or Mac.

Let me know if you have any questions.

2
Framework development / Gui(Chan) Refactoring
« on: June 19, 2011, 02:30:24 am »
Greetings,

Apparently Prock and I have been working on exactly the same thing the past few days, namely the refactoring of FIFE's gui module and decoupling GUIChan from it. In fact, I have some working changes that are very similar to the r3682 svn chageset that Prock authored. Specifically, we both factored out the GUIChan code from GuiManager and made it an abstract base class (actually, an interface in Prock's case). My changes are available in the fife-parpg repo (http://hg.assembla.com/fife-parpg) if you're interested.

I've also been experimenting with different ways of factoring out the GuiFont references in the Engine using a new FontManager class, though these changes are not in fife-parpg yet.

Seeing as how we're working in the same area I thought that we might collaborate if you're interested. At the very least PARPG is probably a good test ground for your changes since we're looking to migrate to a new GUI library. Unfortunately I'm exactly 12 hours behind German time (UTC-10) so IRC communication may be an issue. I'm thinking that the forums here are probably the best means of communicating.

Anyway, let me know what you think.

Pages: [1]