18 {
20
21 int actionMax = 80;
22 int column_index = 0;
23 int item_index = 0;
24 string output = "";
25 string option_text = "";
29
30 int actionCount = actions.Count();
31 for (int i = 0; i < actionCount; ++i)
32 {
34 if (!input)
35 continue;
36
37 if (item_index < actionMax)
38 {
39 output = "";
40 option_text = "";
41 g_Game.GetInput().GetActionDesc(actions.Get(i), option_text);
42
44 {
45 column_index = Math.Floor(item_index / 21);
46 Widget container =
m_Root.FindAnyWidget(
"container" + column_index);
47 if (!container)
48 continue;
49
50 Widget w =
g_Game.GetWorkspace().
CreateWidgets(
"gui/layouts/new_ui/tutorials/xbox/keybindings_panels/keybinding_panel.layout", container);
51 Widget spacer = w.FindWidget(
"Spacer");
52 TextWidget
name = TextWidget.Cast(w.FindWidget(
"KeybindName"));
53 TextWidget mod = TextWidget.Cast(spacer.FindWidget("KeybindModifier"));
54 TextWidget value = TextWidget.Cast(spacer.FindWidget("KeybindButton"));
55
56 string modifier_text = "";
57 name.SetText(option_text);
58 value.SetText(output);
59
61 {
62 mod.SetText(modifier_text);
63 }
64
66 mod.Update();
67 value.Update();
68 spacer.Update();
69
70 item_index++;
71 }
72 }
73 else
74 {
75 option_text = "";
76 g_Game.GetInput().GetActionDesc(actions.Get(i), option_text);
78 }
79 }
80 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo