MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / GUI_Production_Up_Click

Function GUI_Production_Up_Click

src/gui/widget_click.c:1235–1272  ·  view source on GitHub ↗

* Handles Click event for the "Up" button in production window. * * @return True, always. */

Source from the content-addressed store, hash-verified

1233 * @return True, always.
1234 */
1235bool GUI_Production_Up_Click(Widget *w)
1236{
1237 bool drawDetails = false;
1238
1239 if (g_factoryWindowSelected != 0) {
1240 g_timerTimeout = 10;
1241 GUI_FactoryWindow_B495_0F30();
1242 g_factoryWindowSelected--;
1243
1244 GUI_FactoryWindow_UpdateSelection(true);
1245
1246 drawDetails = true;
1247 } else {
1248 if (g_factoryWindowBase != 0) {
1249 g_timerTimeout = 10;
1250 g_factoryWindowBase--;
1251 drawDetails = true;
1252
1253 GUI_FactoryWindow_ScrollList(-1);
1254
1255 GUI_FactoryWindow_UpdateSelection(true);
1256 } else {
1257 GUI_FactoryWindow_DrawDetails();
1258
1259 GUI_FactoryWindow_FailScrollList(-1);
1260 }
1261 }
1262
1263 for (; g_timerTimeout != 0; sleepIdle()) {
1264 GUI_FactoryWindow_UpdateSelection(false);
1265 }
1266
1267 if (drawDetails) GUI_FactoryWindow_DrawDetails();
1268
1269 GUI_Widget_MakeNormal(w, false);
1270
1271 return true;
1272}
1273
1274static void GUI_Purchase_ShowInvoice(void)
1275{

Callers

nothing calls this directly

Tested by

no test coverage detected