How to make buttons unclickable?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

User avatar
Levia
Quite a regular
Quite a regular
Posts: 83
Joined: Mon May 22, 2006 18:25
Location: Bergen op zoom, The Netherlands
Contact:

Postby Levia » Thu Apr 05, 2007 15:18

Ok here you go:
http://rafb.net/p/Yq0PN661.html

Disabled clicking and hovering.

The easiest way of getting this to work is replacing the existing button looknfeel entry, though, all of your other buttons will be like this one. The hard way is to register a new falagard mapping for this button, and give it another name so your other buttons will remain intact.

For example:

Code: Select all

WindowManager::getSingletonPtr()->addFalagardWindowMapping("WindowsLook/DisabledButton", "CEGUI/PushButton", "WindowsLook/DisabledButton", "Falagard/Button");

then you also have to change (or to whatever name you please)

Code: Select all

<WidgetLook name="WindowsLook/Button">
//to
<WidgetLook name="WindowsLook/DisabledButton">

Creating it would require

Code: Select all

WindowManager::getSingletonPtr()->createWindow("WindowsLook/DisabledButton", "button");


Hope it works for you :)
Image
Image

Protagonist
Not too shy to talk
Not too shy to talk
Posts: 23
Joined: Sat Mar 03, 2007 22:54

Postby Protagonist » Fri Apr 06, 2007 13:07

Hey thanks.

That seems straightforward enough.

I put the disabled button defintion in my windowsLook.looknfeel file

However, addFalagardWindowMapping doesn't seem to belong to the windowManager.

I included all the falagard headers, and have things like CEGUI::FalagardComponentBase and the xml helpers etc, but nothing of the sort for creating a custom window...

Hmm

User avatar
Levia
Quite a regular
Quite a regular
Posts: 83
Joined: Mon May 22, 2006 18:25
Location: Bergen op zoom, The Netherlands
Contact:

Postby Levia » Tue Apr 10, 2007 10:19

(Sorry for replying kinda late, I was on vacation for 3 days)
Oh right! Sorry about that, a bit of a huge typo

Code: Select all

CEGUI::WindowFactoryManager * wndFMgr = CEGUI::WindowFactoryManager::getSingletonPtr();
wndFMgr->addFalagardWindowMapping("WindowsLook/GroupBox", "CEGUI/GroupBox", "WindowsLook/GroupBox", "Falagard/Default");
Image

Image


Return to “Help”

Who is online

Users browsing this forum: No registered users and 26 guests