Journal task

Everything about development and the OpenMW source code.
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Re: Journal task

Post by gus »

Sorry i'm late, but no, i'm not using any data from openmw for now (it display a hard coded text for testing purpose), so now that I think of it, it should not come from localization (unless there is some localization stuff in MyGUI).
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Journal task

Post by Zini »

Guess I will have to have a look at it myself eventually. Getting a stack trace here is kinda difficult, because it is not a regular crash, just an exception thrown and caught in main. I must admit I never before had to debug such a case on gdb. Will have to read up on it first. Since I am already swamped with tasks, this will probably take a while.
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Re: Journal task

Post by gus »

That's OK for me. I also don't have much time (i'm on hollyday) so it doesn't matters if it takes some time.
I will post later a few things to explain how the journal GUI works to save you some time.
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Re: Journal task

Post by gus »

Okay,so could you try to comment out line 87 and 88 of journalwindow.cpp?

If it still doesn't work, can you try to comment line 71 to 84 too?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Journal task

Post by Zini »

That is not going to do as any good, since the exception is thrown before the JournalWindow constructor is entered. Probably somewhere in a base-class or a member variable's constructor.

Edit: Okay. I think I found the problem. You are specifying a file named openmw_journal_layout.xml. This file does not exist in my build directory.
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Re: Journal task

Post by gus »

My bad, I forgot to add the layout.xml in CMake :oops: . Corrected now.

Edit: by the way, what is the right way to access MWWorld::Environement from my journalwindow code?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Journal task

Post by Zini »

Corrected now.
Confirmed. Works now. Text is not properly aligned to the book and the book is not properly aligned/scaled on the screen, but a good start.
by the way, what is the right way to access MWWorld::Environement from my journalwindow code?
I don't think you are supposed to access the Environment from a Window. What do you need the Environment for?

Edit: Stupid question. At least you want to play a sound when turning the pages. Currently not supported. But you can add a function

MWWorld::Environment& getEnvironment()

to the WindowManager (the WindowManager has a reference to the Environment). Then you can fetch a reference to the WindowManager through the Window base class.
Last edited by Zini on 26 Dec 2011, 18:49, edited 1 time in total.
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Re: Journal task

Post by gus »

Confirmed. Works now. Text is not properly aligned to the book and the book is not properly aligned/scaled on the screen, but a good start.
Yup, i can't get the layout.xml to work as I want, so don't focus on the visual aspect for the moment.
I don't think you are supposed to access the Environment from a Window. What do you need the Environment for?
Well, i want to access the player journal (from journalWindow), which is stored in Environment I believe.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Journal task

Post by Zini »

Well, i want to access the player journal (from journalWindow), which is stored in Environment I believe.
And that too, yes. See my edit.
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Re: Journal task

Post by gus »

Thanks ;)
Post Reply