From 501d46627e2ec0359401492977ca5df87247078e Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Fri, 30 Mar 2018 20:21:53 +0200 Subject: [PATCH] Show red quad when not connected --- example_remote-client/src/TCPClient.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/example_remote-client/src/TCPClient.cpp b/example_remote-client/src/TCPClient.cpp index 9c7cfce..cdc4dfe 100644 --- a/example_remote-client/src/TCPClient.cpp +++ b/example_remote-client/src/TCPClient.cpp @@ -34,11 +34,14 @@ void TCPClient::update(){ void TCPClient::draw(){ if(_tcpClient.isConnected()){ ofSetColor(0, 255, 0); - ofPushMatrix(); - ofTranslate(10, 10); - ofDrawRectangle(0, 0, 10, 10); - ofPopMatrix(); + }else{ + ofSetColor(255, 0, 0); } + + ofPushMatrix(); + ofTranslate(10, 10); + ofDrawRectangle(0, 0, 10, 10); + ofPopMatrix(); } void TCPClient::send(string message){