]> icculus.org git repositories - divverent/nexuiz.git/blob - data/scmenu/source/control/items.qh
restructure
[divverent/nexuiz.git] / data / scmenu / source / control / items.qh
1 // DP/Nex Menu
2 // control/items.qh
3
4 /*
5 Items/Controls:
6
7 This control is supported/required by the menu manager :
8 Item_Window
9 Item_Reference
10
11 Item_Layout
12
13 The rest is not required:
14 Item_Custom
15
16 Item_Picture
17
18 Item_Text
19
20 Item_Rect
21
22 ITEM_BUTTON
23 ITEM_TEXTBUTTON
24
25
26
27 ITEM_SLIDER
28
29 ITEM_TEXTSWITCH
30 */
31
32 // INFO: some information about the spawn functions
33 // INFO: Since I dont want another namespace clutching all spawn functions will have a nice and neat
34 // INFO: "_Spawn" suffix.
35
36 // item constants
37
38 const float ITEM_ALIGN_LEFT = 0;
39 enumflags {
40         ITEM_ALIGN_CENTER,
41         ITEM_ALIGN_RIGHT,
42         ITEM_ALIGN_FIX_RIGHT,   // |text - actually this isnt necessary
43         ITEM_ALIGN_FIX_CENTER,  // te|xt
44         ITEM_ALIGN_FIX_LEFT,    // text|
45         ITEM_ALIGN_FIRST        // for layouts: Item| ... with | being the origin
46 };
47
48 // flags constant
49
50 enumflags {
51         FLAG_TEMPLATE,                  // this is a template do not touch, do not draw - actually dont do anything with it
52         FLAG_EMBEDDED,                  // the item cant be selected and all its children are embedded into its parent
53         FLAG_HIDDEN,                    // events wont be called and it wont be drawn, etc.
54         FLAG_NOSELECT,                  // cant be selected (but events will be called)
55         FLAG_CONNECTEDONLY,             // only if connected (i.e. playing)
56         FLAG_SERVERONLY,                // only displayed if server
57         FLAG_DEVELOPERONLY,             // only displayed if developer
58         FLAG_DRAWONLY,                  // only the draw event will be called
59         FLAG_CHILDDRAWONLY,             // used to make the children only drawable
60         FLAG_DRAWUPDATEONLY,            // only the draw and update event get called
61         FLAG_CHILDDRAWUPDATEONLY,       // only the draw and refresh events are called for children
62         FLAG_SEALOFFMOUSE               // used to seal all items under the item with this flag off from mouse events
63         // TODO: real seal off all events (not only items not being selected)
64 };
65
66 // [Item_Link] [Item}
67 .entity _link; // item link
68
69 void() Item_Link_Init;
70 void() Item_Link_Destroy;
71 void() Item_Link_Update;
72 bool( float pKey, float pAscii ) Item_Link_Key;
73 void() Item_Link_MouseEnter;
74
75 bool() Item_Link_IsSelected;
76
77 // [Item_Cinematic]
78 .string link; // full name of the video
79 .string normal; // normal name used with cachepic
80
81 void() Item_Cinematic_Destroy;
82 void() Item_Cinematic_Init;
83
84 // Item_Cinematic_Loop [Item_Cinematic]
85 void() Item_Cinematic_Loop_Spawn;
86
87 // Item_Container
88 // used for non-visible, non-selectable data
89 void() Item_Container_Spawn;
90
91 // Parser_Define
92 .string name;
93 .string value;
94
95 /*
96 // ITEM_EDITBOX (derived from ITEM_TEXT mostly)
97 .string format; // //wildcards are * for each letter except the next after it - \* for * and * / space ' ' for one letter e.g. "   .   .   .   " for an ip field
98 .float maxlen; // -1 for infinite
99 .float _cursorpos;*/