Code/Sample/SampleDisabled/SampleDisabled.cpp
//=================================================================================================
// Function used by the sample, to draw all ImGui Content
//=================================================================================================
Function used by the sample, to draw all ImGui Content
Function used by the sample to draw all ImGui Content
const ImDrawData* Client_Draw()
{
	NetImgui::NewFrame();
	ClientUtil_ImGuiContent_Common("SampleDisabled", false);
	ImGui::SetNextWindowPos(ImVec2(32,48), ImGuiCond_Once);
	ImGui::SetNextWindowSize(ImVec2(400,400), ImGuiCond_Once);
	if( ImGui::Begin("Sample Basic", nullptr) )
	{
		ImGui::TextColored(ImVec4(0.1, 1, 0.1, 1), "Compiling with netImgui Disabled.");		
		ImGui::TextWrapped(	"This shows being able to continue using ImGui normally, while netImgui code has been disabled. "
							"No connection with the remote netImgui will be possible since the client code is entirely ifdef out "
							"and the netImgui client API left with shell content calling Dear Imgui directly.");
		ImGui::NewLine();
		ImGui::TextColored(ImVec4(0.1, 1, 0.1, 1), "Where are we drawing: ");
		ImGui::SameLine();
		ImGui::TextUnformatted(NetImgui::IsDrawingRemote() ? "Remote Draw" : "Local Draw");
		ImGui::NewLine();
		ImGui::TextColored(ImVec4(0.1, 1, 0.1, 1), "Filler content");
		ImGui::TextWrapped("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.");
	}
	ImGui::End();
	NetImgui::EndFrame();
	return !NetImgui::IsConnected() ? NetImgui::GetDrawData() : nullptr;
}
const ImDrawData * Client_Draw ( ) { NetImgui :: NewFrame ( ) ; ClientUtil_ImGuiContent_Common ( " " , false ) ; ImGui :: SetNextWindowPos ( ImVec2 ( 32 , 48 ) , ImGuiCond_Once ) ; ImGui :: SetNextWindowSize ( ImVec2 ( 400 , 400 ) , ImGuiCond_Once ) ; if ( ImGui :: Begin ( " " , nullptr ) ) { ImGui :: TextColored ( ImVec4 ( 0.1 , 1 , 0.1 , 1 ) , " " ) ; ImGui :: TextWrapped ( " " " " " " ) ; ImGui :: NewLine ( ) ; ImGui :: TextColored ( ImVec4 ( 0.1 , 1 , 0.1 , 1 ) , " " ) ; ImGui :: SameLine ( ) ; ImGui :: TextUnformatted ( NetImgui :: IsDrawingRemote ( ) ? " " : " " ) ; ImGui :: NewLine ( ) ; ImGui :: TextColored ( ImVec4 ( 0.1 , 1 , 0.1 , 1 ) , " " ) ; ImGui :: TextWrapped ( " " ) ; } ImGui :: End ( ) ; NetImgui :: EndFrame ( ) ; return ! NetImgui :: IsConnected ( ) ? NetImgui :: GetDrawData ( ) : nullptr ; }
Function used by the sample, to draw all ImGui Content
Function used by the sample to draw all ImGui Content
//--------------------------------------------------------------------------------------------- // (1) Start a new Frame //--------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------- // (2) Draw ImGui Content 		 //-----------------------------------------------------------------------------------------	 //--------------------------------------------------------------------------------------------- // (3) Finish the frame, preparing the drawing data and... // (3a) Send the data to the netImGui server when connected //--------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------- // (4) Forward to drawing data our local renderer when not remotely drawing //---------------------------------------------------------------------------------------------