CobaltAlphaWindow This class forms the basis for Cobalt's menu panels. It features variable alpha see-through visibility and the ability to automatically present scrollbars when the called-for menu panel is too big to fit inside the parent Cobalt world window. How to use CobaltAlphaWindow to create new menu panels. Fastest/easiest way may be to copy/adapt a small existing menu panel class (such as Person Info Panel CCobaltAlphaPersonPanel), or at least study its example. Steps from scratch: 1) Make the new panel a subclass of CobaltAlphaWindow setupCostume super setupCostume. self addRow: 'label goes here' withWidget nameOfYourWidgetHere. which adds them to the panel's panelPane (which refers to the area interior to the scrollbars and titlebar.. If a horizontal dividing line is desired between rows, use the message self addDivider. between the relevant rows to insert a divider. Once all of the panel's rows are added to the panelPane, then the panelPane is added to self (the whole menu panel window) with the message at the end of the setupCostume method and the panel is then instantiated. When a Widget needs to be comprised of several sub-Widgets, there exists a method called newWidgetRow to compose them into a single CPlayer within the column element. |
Documentation > Developer Resources >