From 67609da29be628913a79997e85cace1718501529 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Wed, 5 Dec 2018 23:14:34 +0200 Subject: [PATCH] Contain styling of the connection indicator --- example_remote-server/src/TCPServer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/example_remote-server/src/TCPServer.cpp b/example_remote-server/src/TCPServer.cpp index e3c5127..2bfa21a 100644 --- a/example_remote-server/src/TCPServer.cpp +++ b/example_remote-server/src/TCPServer.cpp @@ -77,10 +77,12 @@ void TCPServer::draw(){ int clientsConnected = 0; for(auto i = 0; i < numClients; ++i){ if(_tcpServer.isClientConnected(i)){ - ofSetColor(0, 255, 0); ofPushMatrix(); - ofTranslate(10, 10); - ofDrawRectangle(clientsConnected * 20, 0, 10, 10); + ofTranslate(10, 10); + ofPushStyle(); + ofSetColor(0, 255, 0); + ofDrawRectangle(clientsConnected * 20, 0, 10, 10); + ofPopStyle(); ofPopMatrix(); clientsConnected++; }