Exemplo n.º 1
0
void ErrorLog::IssueDebuggerBreak()
{
#ifdef GLI_BUILD_WINDOWS
  
  //Only issue a break if there is an attached debugger
  if(IsDebuggerActive())
  {
    //Issue break. (could also use __asm {int 3}
    DebugBreak();
  }
  
#endif //GLI_BUILD_WINDOWS

#ifdef GLI_BUILD_LINUX

  //Only issue a break if there is an attached debugger
  if(IsDebuggerActive())
  {
    //Issue a breakpoint (call raise(SIGTRAP) or int 3 here?)
    asm volatile ( "int $0x3" ); 
  }
  
#endif //GLI_BUILD_LINUX  
  
}
void SBehaviorTreeBlackboardEditor::HandleDeleteEntry()
{
	check(BlackboardData);

	if(!IsDebuggerActive())
	{
		bool bIsInherited = false;
		FBlackboardEntry* BlackboardEntry = GetSelectedEntry(bIsInherited);
		if(BlackboardEntry != nullptr && !bIsInherited)
		{
			const FScopedTransaction Transaction(LOCTEXT("BlackboardEntryDeleteTransaction", "Delete Blackboard Entry"));
			BlackboardData->SetFlags(RF_Transactional);
			BlackboardData->Modify();
		
			for(int32 ItemIndex = 0; ItemIndex < BlackboardData->Keys.Num(); ItemIndex++)
			{
				if(BlackboardEntry == &BlackboardData->Keys[ItemIndex])
				{
					BlackboardData->Keys.RemoveAt(ItemIndex);
					break;
				}
			}

			GraphActionMenu->RefreshAllActions(true);
			OnBlackboardKeyChanged.ExecuteIfBound(BlackboardData, nullptr);

			// signal de-selection
			if(OnEntrySelected.IsBound())
			{
				OnEntrySelected.Execute(nullptr, false);
			}
		}
	}
}
void SBehaviorTreeBlackboardEditor::HandleRenameEntry()
{
	if(!IsDebuggerActive())
	{
		GraphActionMenu->OnRequestRenameOnActionNode();
	}
}
void SBehaviorTreeBlackboardEditor::FillContextMenu(FMenuBuilder& MenuBuilder) const
{
	if(!IsDebuggerActive() && HasSelectedItems())
	{
		MenuBuilder.AddMenuEntry(FBTBlackboardCommands::Get().DeleteEntry);
		MenuBuilder.AddMenuEntry(FGenericCommands::Get().Rename, NAME_None, LOCTEXT("Rename", "Rename"), LOCTEXT("Rename_Tooltip", "Renames this blackboard entry.") );
	}
}
Exemplo n.º 5
0
void ErrorLog::SetDebuggerLogEnabled(bool enable)
{
  //Only allow an enable if there is a debugger active
  if(enable && IsDebuggerActive())
  {
    debuggerLogEnabled = true;
  }
  else
  {
    debuggerLogEnabled = false;
  }
}
bool SBehaviorTreeBlackboardEditor::CanRenameEntry() const
{
	const bool bModeActive = OnIsBlackboardModeActive.IsBound() && OnIsBlackboardModeActive.Execute();

	if(!IsDebuggerActive() && bModeActive)
	{
		bool bIsInherited = false;
		FBlackboardEntry* BlackboardEntry = GetSelectedEntry(bIsInherited);
		if(BlackboardEntry != nullptr)
		{
			return !bIsInherited;
		}
	}

	return false;
}