Skip to content

Commit

Permalink
Added check to imageWindow to protect against missing cab file image
Browse files Browse the repository at this point in the history
  • Loading branch information
DccPlusPlus committed Nov 1, 2015
1 parent 11d17dd commit 16ed5f2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions DCCpp_Controller/gWindows.pde
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,11 @@ class ImageWindow extends Window{
fill(color(200,0,0));
textFont(messageFont,20);
text("PLEASE SELECT CAB TO DISPLAY IMAGE",xPos+w/2,yPos+h/2);
} else if(throttle.cabButton.cabImage==null){
textAlign(CENTER,CENTER);
fill(color(200,0,0));
textFont(messageFont,20);
text("NO IMAGE FILE FOUND FOR THIS CAB",xPos+w/2,yPos+h/2);
} else{
imageMode(CORNER);
image(throttle.cabButton.cabImage,xPos,yPos,w,h);
Expand Down

0 comments on commit 16ed5f2

Please sign in to comment.