MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / NewBattleState

Method NewBattleState

src/Menu/NewBattleState.cpp:64–252  ·  view source on GitHub ↗

* Initializes all the elements in the New Battle window. * @param game Pointer to the core game. */

Source from the content-addressed store, hash-verified

62 * @param game Pointer to the core game.
63 */
64NewBattleState::NewBattleState(Game *game) : State(game), _craft(0)
65{
66 // Create objects
67 _window = new Window(this, 320, 200, 0, 0, POPUP_BOTH);
68 _txtTitle = new Text(320, 17, 0, 9);
69
70 _txtMapOptions = new Text(148, 9, 8, 68);
71 _frameLeft = new Frame(148, 96, 8, 78);
72 _txtAlienOptions = new Text(148, 9, 164, 68);
73 _frameRight = new Frame(148, 96, 164, 78);
74
75 _txtMission = new Text(100, 9, 8, 30);
76 _cbxMission = new ComboBox(this, 214, 16, 98, 26);
77
78 _txtCraft = new Text(100, 9, 8, 50);
79 _cbxCraft = new ComboBox(this, 106, 16, 98, 46);
80 _btnEquip = new TextButton(106, 16, 206, 46);
81
82 _txtDarkness = new Text(120, 9, 22, 83);
83 _slrDarkness = new Slider(120, 16, 22, 93);
84
85 _txtTerrain = new Text(120, 9, 22, 113);
86 _cbxTerrain = new ComboBox(this, 120, 16, 22, 123);
87
88 _txtDifficulty = new Text(120, 9, 178, 83);
89 _cbxDifficulty = new ComboBox(this, 120, 16, 178, 93);
90
91 _txtAlienRace = new Text(120, 9, 178, 113);
92 _cbxAlienRace = new ComboBox(this, 120, 16, 178, 123);
93
94 _txtAlienTech = new Text(120, 9, 178, 143);
95 _slrAlienTech = new Slider(120, 16, 178, 153);
96
97 _btnOk = new TextButton(100, 16, 8, 176);
98 _btnCancel = new TextButton(100, 16, 110, 176);
99 _btnRandom = new TextButton(100, 16, 212, 176);
100
101 // Set palette
102 setPalette("PAL_GEOSCAPE", 0);
103
104 add(_window);
105 add(_txtTitle);
106 add(_txtMapOptions);
107 add(_frameLeft);
108 add(_txtAlienOptions);
109 add(_frameRight);
110
111 add(_txtMission);
112 add(_txtCraft);
113 add(_btnEquip);
114
115 add(_txtDarkness);
116 add(_slrDarkness);
117 add(_txtTerrain);
118 add(_txtDifficulty);
119 add(_txtAlienRace);
120 add(_txtAlienTech);
121 add(_slrAlienTech);

Callers

nothing calls this directly

Calls 15

loadFunction · 0.85
setThicknessMethod · 0.80
getTexturesMethod · 0.80
setOptionsMethod · 0.80
onMouseClickMethod · 0.80
onKeyboardPressMethod · 0.80
setColorMethod · 0.45
setBackgroundMethod · 0.45
getSurfaceMethod · 0.45
getResourcePackMethod · 0.45
setAlignMethod · 0.45
setBigMethod · 0.45

Tested by

no test coverage detected