help open file dialogue

dicky18

14-12-2006 14:45:49

Hi im new to ogre3d i need to have open file dialogue to load different 3d scenes
Anyone?
thx in advance

azteke

14-12-2006 21:44:11

Maybe you can use windows for recieving strings and use CEGUI to show the filesystem?

dicky18

14-12-2006 21:46:14

thx 4 ur reply but im new to this if u can give more details that would be great
thx again

azteke

14-12-2006 22:29:33

I'm also new to Ogre, don't have any experience with CEGUI. But as I said, you should know enough about developing software to reach the filesystem, and can pass that to CEGUI.

Now let's find some help on getting Crazy Eddie's software to work :)

vincenz0

15-12-2006 08:44:06

i just got my cegui working in mij C# project maybe this could help:

make a standard ogredotnet project and make references to the dll's.
then use these code references:

using System;
using System.Text;
using System.Drawing;
using OgreDotNet;
using System.IO;
using Math3D;
using CeguiDotNet;
using OgreDotNet.Cegui;


for my program i use these variables:


/* this is my ogre variables
public Debugger Debugger = new Debugger();

public Root mRoot = new Root();
public RenderWindow mRenderWindow = null;
public SceneManager mSceneManager = null;

public Camera mCamera;
public Viewport mViewport;
*/

//my cegui variables
protected OgreCEGUIRenderer mGuiRenderer = null;
protected GuiSystem mGuiSystem = null;
protected Window mBackgroundWindow = null;
protected Window mEditorWindow = null;
protected PushButton mQuitButton = null;
protected Editbox mEditbox = null;
protected Combobox mCombobox = null;
protected Log mLog = null;
protected EventHandler mEventHandler = null;


and here you see a example of cegui code, here i initialize it and i show you how to create a window with a button.


mGuiRenderer = new OgreCEGUIRenderer(mRenderWindow,
(byte)RenderQueueGroupID.RENDER_QUEUE_OVERLAY, false, 3000, mSceneManager);
mGuiRenderer.Initialise();
mGuiSystem = new GuiSystem(mGuiRenderer);

Logger.Instance.setLoggingLevel(LoggingLevel.Informative);

SchemeManager.Instance.LoadScheme("TaharezLookSkin.scheme");
mGuiSystem.SetDefaultMouseCursor("TaharezLook", "MouseArrow");
mGuiSystem.DefaultFontName = "BlueHighway-12";

//Setup Mouse cursor
MouseCursor.getSingleton().setImage("TaharezLook", "MouseArrow");

//main 'root' window
mBackgroundWindow = WindowManager.Instance.CreateWindow("DefaultWindow", "BackgroundWindow");
mGuiSystem.GUISheet = mBackgroundWindow;

//edit window
mEditorWindow = WindowManager.Instance.CreateWindow("TaharezLook/FrameWindow", "TestWindow");
mBackgroundWindow.AddChildWindow(mEditorWindow);
mEditorWindow.SetSize(0.4f, 0.4f);
mEditorWindow.SetPosition(0.58f, 0.02f);
mEditorWindow.Text = "TFS Menu Test";
mEditorWindow.SubscribeEvents();

//quitbutton on window
mQuitButton = WindowManager.Instance.CreatePushButton("TaharezLook/Button", "QuitButton");
mQuitButton.Text = "Knopje";
mQuitButton.SetPosition(0.1f, 0.15f);
mQuitButton.SetSize(0.8f, 0.15f);
mQuitButton.SubscribeEvents();
mQuitButton.Clicked += new WindowEventDelegate(QuitClicked);
mEditorWindow.AddChildWindow(mQuitButton);


hope this helps ;)

azteke

15-12-2006 09:14:20

I'm getting a TypeInitializationException was unhandled error:
The type initializer for 'OgreDotNet.Cegui.OgreBindings_CeguiPINVOKE' threw an exception.

The exception is thrown at: mGuiRenderer = new OgreCEGUIRenderer(grRenderWindow,
(byte)RenderQueueGroupID.RENDER_QUEUE_OVERLAY, false, 3000, grSceneManager);

Also mGuiRenderer = new OgreCEGUIRenderer(grRenderWindow); is not working.

Anybody have an idea?

vincenz0

15-12-2006 09:19:59

this means you are missing a dll, try adding all the right dll files and setting your resources.cfg to the right directory's

edit:

to get you going:

i made a rar of my dll files: http://home.illios.nl/tfs/documents/dll.rar

extract this in your debug/build folder

then add these references to your project:


CeguiDotNet.dll
Math3D.dll
OgreDotNet.dll
OgreDotNet.Cegui.dll


good luck! :)

azteke

15-12-2006 12:56:28

Okay, got my application to work properly, but I had to disable the TaharezLook stuff because I don't have those .scheme files :)

But thanks, I know cegui is working now so I guess it's only a matter of setting up stuff.

Topicstarter: What's the state of your efforts on trying to load cegui?

dicky18

17-12-2006 20:07:01

thx a lot guys that helped a lot its finally working with the dll files
thx