Page 1 of 1

question on how to solve a problem

Posted: Wed Dec 08, 2010 14:33
by nevarim
hi all
i have a problem with caelum, this module use a previews version of cegui, how can i translate in the last version? :D


void CaelumLabFrameListener::initGui () {
mGuiRenderer.reset(new CEGUI::OgreCEGUIRenderer (
mWindow, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, mSceneMgr));
mGuiSystem.reset(new CEGUI::System (mGuiRenderer.get()));

CEGUI::Logger::getSingleton ().setLoggingLevel (CEGUI::Informative);

// load scheme and set up defaults
CEGUI::SchemeManager::getSingleton ().loadScheme((CEGUI::utf8*)"TaharezLookSkin.scheme");
mGuiSystem->setDefaultMouseCursor ((CEGUI::utf8*)"TaharezLook", (CEGUI::utf8*)"MouseArrow");
// BlueHighway-10 does not rescale with resolution. This is desirable.
mGuiSystem->setDefaultFont ((CEGUI::utf8*)"BlueHighway-10");

CEGUI::WindowManager* wmgr = CEGUI::WindowManager::getSingletonPtr ();
CEGUI::Window* sheet = wmgr->loadWindowLayout (CEGUI::String("CaelumLab.layout"));
mGuiSystem->setGUISheet (sheet);

CEGUI::Window* wnd = CEGUI::WindowManager::getSingleton().getWindow("CaelumLab");
wnd->subscribeEvent(CEGUI::Window::EventMouseMove,
CEGUI::Event::Subscriber(&CaelumLabFrameListener::handleMouseMove, this));
wnd->subscribeEvent(CEGUI::Window::EventMouseButtonUp,
CEGUI::Event::Subscriber(&CaelumLabFrameListener::handleMouseUp, this));
wnd->subscribeEvent(CEGUI::Window::EventMouseButtonDown,
CEGUI::Event::Subscriber(&CaelumLabFrameListener::handleMouseDown, this));
(getWidget<CEGUI::Scrollbar> ("CaelumLab/TimeScaleScrollbar"))->getThumb ()->subscribeEvent(
CEGUI::Window::EventMouseDoubleClick,
CEGUI::Event::Subscriber(&CaelumLabFrameListener::handleTimeScaleDoubleClick, this));
(getWidget<CEGUI::Scrollbar> ("CaelumLab/DumpButton"))->subscribeEvent(
CEGUI::Window::EventMouseClick,
CEGUI::Event::Subscriber(&CaelumLabFrameListener::handleDumpClick, this));
(getWidget<CEGUI::Scrollbar> ("CaelumLab/ResetButton"))->subscribeEvent(
CEGUI::Window::EventMouseClick,
CEGUI::Event::Subscriber(&CaelumLabFrameListener::handleResetClick, this));
(getWidget<CEGUI::Scrollbar> ("CaelumLab/QuitButton"))->subscribeEvent(
CEGUI::Window::EventMouseClick,
CEGUI::Event::Subscriber(&CaelumLabFrameListener::handleQuitClick, this));

mScriptingUI.init ();
initMaterialSchemeUI ();
}

Re: question on how to solve a problem

Posted: Wed Dec 08, 2010 14:43
by Kulik
You win the grand prize for having the most generic thread subject imaginable! (and this is not a good thing, please take 5 minutes to figure out why the concept of thread subjects exists)

By previous version do you mean 0.6 as in previous major version? It certainly seems so..

Porting tips from 0.6 to 0.7 are published on the wiki - http://www.cegui.org.uk/wiki/index.php/Changes_and_Porting_Tips_for_0.7.0

Re: question on how to solve a problem

Posted: Wed Dec 08, 2010 16:20
by nevarim
ok the title of the post is a little generic ^^ sorry

i try to update on the wiki

Thanks

Nevarim

Re: question on how to solve a problem

Posted: Wed Dec 08, 2010 17:56
by nevarim
ok problem is on
mGuiRenderer.reset(new CEGUI::OgreCEGUIRenderer (
mWindow, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, mSceneMgr));

it seems that isn't a corrispondance on new version for CEGUI

how can i do for place functionally? :D

Re: question on how to solve a problem

Posted: Wed Dec 08, 2010 20:23
by Kulik
http://mattgemmell.com/2008/12/08/what-have-you-tried ?

It's in the wiki article, just read it :) I have given you all the info you need to solve your problem. Spoonfeeding you would spoil all the other forum members and that would consequently force me to quit the forum altogether.

Re: question on how to solve a problem

Posted: Thu Dec 09, 2010 12:30
by nevarim
ok i'll try it :)

ido not ask to make my work but cannot understand error before :D