void LocationTree::RebuildLocationTree() { GuiMapPtr map = chkd.maps.curr; EmptySubTree(hLocationRoot); buffer& MRGN = map->MRGN(); if ( MRGN.exists() ) { ChkLocation* loc; ChkdString locName; for ( u32 i=0; i<MRGN.size()/CHK_LOCATION_SIZE; i++ ) { // In general a location must have a string or non-zero coordinates or a specified elevation if ( ( i != 63 || !map->LockAnywhere() ) && map->getLocation(loc, u8(i)) && ( loc->stringNum != 0 || loc->xc1 != 0 || loc->xc2 != 0 || loc->yc1 != 0 || loc->xc2 != 0 || loc->elevation != 0 ) ) { if ( map->getLocationName((u16)i, locName) ) InsertLocationItem(locName.c_str(), i); else InsertLocationItem(std::string("Location " + std::to_string(i)).c_str(), i); } } } if ( map->getLayer() == LAYER_LOCATIONS ) ExpandItem(hLocationRoot); RedrawThis(); }
void TrigGeneralWindow::ToggleAdvancedMode() { advancedMode = !advancedMode; if ( advancedMode ) // Now in advanced mode { buttonAdvanced.SetText("Standard"); checkIgnoreWaitSkipOnce.Show(); checkIgnoreManyActions.Show(); checkIgnoreDefeatDraw.Show(); checkFlagPaused.Show(); textRawFlags.Show(); editRawFlags.Show(); checkExtendedCommentString.Show(); checkExtendedCommentAction.Show(); checkExtendedNotesString.Show(); checkExtendedNotesAction.Show(); buttonDeleteComment.Show(); buttonDeleteNotes.Show(); } else // Now in standard mode { buttonAdvanced.SetText("Advanced"); checkIgnoreWaitSkipOnce.Hide(); checkIgnoreManyActions.Hide(); checkIgnoreDefeatDraw.Hide(); checkFlagPaused.Hide(); textRawFlags.Hide(); editRawFlags.Hide(); checkExtendedCommentString.Hide(); checkExtendedCommentAction.Hide(); checkExtendedNotesString.Hide(); checkExtendedNotesAction.Hide(); buttonDeleteComment.Hide(); buttonDeleteNotes.Hide(); } Hide(); Show(); // Dirty fix to redraw issues RedrawThis(); // Apparently a call to RedrawWindow is insufficient }