Hi everyone
How we can change the amount of progress of the widget like taharezlook/ProgressBar?
i add this widget in my application but i can't change it!
change the value of falagard/progressbar
Moderators: CEGUI MVP, CEGUI Team
Re: change the value of falagard/progressbar
You can change it by calling the setProgress() method. It takes a parameter between 0.0 and 1.0. Or you can use step() to move it one step at a time.
Re: change the value of falagard/progressbar
Timo wrote:You can change it by calling the setProgress() method. It takes a parameter between 0.0 and 1.0. Or you can use step() to move it one step at a time.
Hi
there isn't any function with name "setProgress" in CEGUI::Window class!
please see my code and help me!
CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"TaharezlookSkin.scheme");
mSystem->setDefaultMouseCursor((CEGUI::utf8*)"Taharezlook",(CEGUI::utf8*)"MouseArrow");
CEGUI::WindowManager* win = CEGUI::WindowManager::getSingletonPtr();
CEGUI::Window* sheet = win->createWindow("DefaultGUISheet", "CEGUIDemo/Sheet");
CEGUI::Window* p = win->createWindow("Taharezlook/ProgressBar","CEGUIDemo/MyProgressbar");
p->(a function may be here!!!!)
Re: change the value of falagard/progressbar
You need to cast down to the progress bar class
Something like (untested, just typed into forum directly)
CEGUI can't return the specific type of the window because it uses an factory method which can return any of the various types of windows. All it can do is return the base class type.
Something like (untested, just typed into forum directly)
Code: Select all
CEGUI::Window* pbarWindow = ...
CEGUI::ProgressBar* pbar = dynamic_cast<CEGUI::ProgressBar*>(pbarWindow);
CEGUI can't return the specific type of the window because it uses an factory method which can return any of the various types of windows. All it can do is return the base class type.
Re: change the value of falagard/progressbar
Please post in the appropriate forum.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!
Re: change the value of falagard/progressbar
thank you emarcotte and Timo
i do that with a code like this:
CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"Takavarskin.scheme");
mSystem->setDefaultMouseCursor((CEGUI::utf8*)"Takavar",(CEGUI::utf8*)"MouseArrow");
CEGUI::WindowManager* win = CEGUI::WindowManager::getSingletonPtr();
CEGUI::Window* sheet = win->createWindow("DefaultGUISheet", "CEGUIDemo/Sheet");
CEGUI::ProgressBar* pbar = (CEGUI::ProgressBar*)(win->createWindow("Takavar/ProgressBar","p"));
sheet->addChildWindow((CEGUI::Window*)pbar);
i do that with a code like this:
CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"Takavarskin.scheme");
mSystem->setDefaultMouseCursor((CEGUI::utf8*)"Takavar",(CEGUI::utf8*)"MouseArrow");
CEGUI::WindowManager* win = CEGUI::WindowManager::getSingletonPtr();
CEGUI::Window* sheet = win->createWindow("DefaultGUISheet", "CEGUIDemo/Sheet");
CEGUI::ProgressBar* pbar = (CEGUI::ProgressBar*)(win->createWindow("Takavar/ProgressBar","p"));
sheet->addChildWindow((CEGUI::Window*)pbar);
Who is online
Users browsing this forum: No registered users and 9 guests