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

Method setAction

src/Battlescape/ActionMenuItem.cpp:86–94  ·  view source on GitHub ↗

* Links with an action and fills in the text fields. * @param action The battlescape action. * @param description The actions description. * @param accuracy The actions accuracy, including the Acc> prefix. * @param timeunits The timeunits string, including the TUs> prefix. * @param tu The timeunits value. */

Source from the content-addressed store, hash-verified

84 * @param tu The timeunits value.
85 */
86void ActionMenuItem::setAction(BattleActionType action, std::wstring description, std::wstring accuracy, std::wstring timeunits, int tu)
87{
88 _action = action;
89 _txtDescription->setText(description);
90 _txtAcc->setText(accuracy);
91 _txtTU->setText(timeunits);
92 _tu = tu;
93 _redraw = true;
94}
95
96/**
97 * Gets the action that was linked to this menu item.

Callers 1

addItemMethod · 0.80

Calls 1

setTextMethod · 0.45

Tested by

no test coverage detected