comparison Samples/Sdl/TrackerSampleApp.cpp @ 753:a386bbc955dc

dummy
author Benjamin Golinvaux <bgo@osimis.io>
date Wed, 22 May 2019 16:01:34 +0200
parents 284f37dc1c66
children 92c400a09f1b
comparison
equal deleted inserted replaced
752:6030db24eaea 753:a386bbc955dc
158 void TrackerSampleApp::HandleApplicationEvent( 158 void TrackerSampleApp::HandleApplicationEvent(
159 const SDL_Event & event) 159 const SDL_Event & event)
160 { 160 {
161 DisplayInfoText(); 161 DisplayInfoText();
162 162
163 // we seed the random number generator for random measure tool
164 // generation
165 srand(42);
166
163 if (event.type == SDL_MOUSEMOTION) 167 if (event.type == SDL_MOUSEMOTION)
164 { 168 {
165 int scancodeCount = 0; 169 int scancodeCount = 0;
166 const uint8_t* keyboardState = SDL_GetKeyboardState(&scancodeCount); 170 const uint8_t* keyboardState = SDL_GetKeyboardState(&scancodeCount);
167 171
248 { 252 {
249 LOG(WARNING) << "You cannot change the active tool when an interaction" 253 LOG(WARNING) << "You cannot change the active tool when an interaction"
250 " is taking place"; 254 " is taking place";
251 } 255 }
252 break; 256 break;
257
258 case SDLK_m:
259 // let's create a random measuring tool
260
261
253 262
254 case SDLK_s: 263 case SDLK_s:
255 controller_->FitContent(compositor_->GetCanvasWidth(), 264 controller_->FitContent(compositor_->GetCanvasWidth(),
256 compositor_->GetCanvasHeight()); 265 compositor_->GetCanvasHeight());
257 break; 266 break;