row counter
sets alpha level for even/odd child
См. определение в файле PluginDrawCheckerboard.c строка 16
17 {
18#ifndef NO_GUI
20 {
23 int childId = 0;
24 int row = 0;
25 bool evenOrOdd;
26 int tilesPerLine = 8;
27
29 while(child)
30 {
31 evenOrOdd =
IsEven(childId);
32
34 if(childId > (tilesPerLine * row) - 1)
35 {
36 row++;
37 }
38
40 {
41 evenOrOdd = !evenOrOdd;
42 }
43
45 if(evenOrOdd)
46 child.SetAlpha(0.15);
47 else
48 child.SetAlpha(0.05);
49
50 child = child.GetSibling();
51 childId++;
52 }
53 }
54#endif
55 }
proto native WorkspaceWidget GetWorkspace()
bool IsEven(int num)
even or odd
proto native CGame GetGame()
Перекрестные ссылки WorkspaceWidget::CreateWidgets(), GetGame(), CGame::GetWorkspace(), IsEven() и m_MainWindow.
Используется в PluginDrawCheckerboard().