MCPcopy Create free account
hub / github.com/EasyRPG/Player / Pop

Method Pop

src/scene_debug.cpp:336–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334
335
336void Scene_Debug::Pop() {
337 range_window->SetActive(false);
338 var_window->SetActive(false);
339 numberinput_window->SetActive(false);
340 numberinput_window->SetVisible(false);
341 choices_window->SetActive(false);
342 choices_window->SetVisible(false);
343 stringview_window->SetActive(false);
344 stringview_window->SetVisible(false);
345 interpreter_window->SetActive(false);
346
347 if (mode == eInterpreter) {
348 interpreter_window->SetIndex(-1);
349 interpreter_window->SetVisible(true);
350 var_window->SetVisible(false);
351 } else {
352 var_window->SetIndex(-1);
353 var_window->SetVisible(true);
354 interpreter_window->SetVisible(false);
355 }
356
357 if (stack_index == 0) {
358 Scene::Pop();
359 return;
360 }
361
362 --stack_index;
363
364 auto& frame = GetFrame();
365 auto nui = frame.uimode;
366 switch (nui) {
367 case eUiMain:
368 var_window->SetMode(Window_VarList::eNone);
369 interpreter_window->SetVisible(false);
370 range_index = (static_cast<int>(mode) - 1) % 10;
371 range_page = (static_cast<int>(mode) - 1) / 10;
372 range_window->SetActive(true);
373 range_window->SetIndex(range_index);
374 break;
375 case eUiRangeList:
376 range_window->SetActive(true);
377 RestoreRangeSelectionFromSelectedValue(frame.value);
378 range_window->SetIndex(range_index);
379 break;
380 case eUiVarList:
381 var_window->SetActive(true);
382 var_window->SetItemIndex((frame.value - 1) % var_window->GetItemCount());
383 break;
384 case eUiNumberInput:
385 numberinput_window->SetNumber(frame.value);
386 numberinput_window->SetActive(true);
387 numberinput_window->SetVisible(true);
388 break;
389 case eUiChoices:
390 choices_window->SetIndex(frame.value);
391 choices_window->SetActive(true);
392 choices_window->SetVisible(true);
393 break;

Callers

nothing calls this directly

Calls 7

SetItemIndexMethod · 0.80
SetNumberMethod · 0.80
SetActiveMethod · 0.45
SetVisibleMethod · 0.45
SetIndexMethod · 0.45
SetModeMethod · 0.45
GetItemCountMethod · 0.45

Tested by

no test coverage detected