Create a CheckListboxItem

From CEGUI Wiki - Crazy Eddie's GUI System (Open Source)
Revision as of 18:36, 5 April 2007 by Levia (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Sometimes you need a list where the items are checkable. The ItemListbox introduced in CEGUI 0.5 accepts all sorts of items, as long as they inherit ItemEntry. I'm going to teach you how to create a CheckListboxItem to put in your list.

Getting started!

We are first going to get started by writing the looknfeel entry. This is the most important part of this tutorial, as its basically 70% of what we need to do to achieve our goal. First of all, this entry has a few states:

  1. Enabled: How the item looks when the item is enabled.
  2. Disabled: How the item looks when the item is disabled.
  3. SelectedEnabled: How the item looks when the item is selected and is enabled.
  4. SelectedDisabled: How the item looks when the item is selected and is disabled.