MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / OnTrigAddToCurportal

Method OnTrigAddToCurportal

editor/TriggerDialog.cpp:478–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476}
477
478void CTriggerDialog::OnTrigAddToCurportal() {
479 ASSERT(Curportal != -1);
480 ASSERT(!(Curroomp->faces[Curroomp->portals[Curportal].portal_face].flags & FF_HAS_TRIGGER));
481
482 char name[TRIG_NAME_LEN + 1] = "";
483
484 if (!InputString(name, sizeof(name), "Trigger Name", "Enter a name for this trigger"))
485 return;
486
487 Current_trigger = AddTrigger(name, ROOMNUM(Curroomp), Curroomp->portals[Curportal].portal_face, AF_PLAYER, NULL);
488 UpdateDialog();
489}
490
491void CTriggerDialog::UpdateKeypad(int mask) {
492 if (mask & (KUF_CURROOM_CHANGED + KUF_CURFACE_CHANGED + KUF_CURPORTAL_CHANGED))

Callers

nothing calls this directly

Calls 2

InputStringFunction · 0.85
AddTriggerFunction · 0.85

Tested by

no test coverage detected