computor Posted December 16, 2014 Share Posted December 16, 2014 I've tried using the tutorial on how to hide/show paints, but for some reason it just crashes my bot. Could anyone give me a WORKING example of it? It being: when you click an area on screen your paint is hidden/shown. Link to comment Share on other sites More sharing options...
Precise Posted December 16, 2014 Share Posted December 16, 2014 Post what you have so far and people will help you. (Mouselistener?) Link to comment Share on other sites More sharing options...
TheScrub Posted December 18, 2014 Share Posted December 18, 2014 You need to listen for mouse events and set a boolean if the area was clicked PSEUDO CODE onMouseEvent (EVENT) IF (EVENT_CLICK == LEFT CLICK) HIDE = TRUE IF NOT HIDDEN ELSE FALSE onDraw(Graphics object) IF (!HIDE) DRAW PAINT ELSE DRAW UNHIDE BUTTON Link to comment Share on other sites More sharing options...
computor Posted December 19, 2014 Author Share Posted December 19, 2014 You need to listen for mouse events and set a boolean if the area was clicked PSEUDO CODE onMouseEvent (EVENT) IF (EVENT_CLICK == LEFT CLICK) HIDE = TRUE IF NOT HIDDEN ELSE FALSE onDraw(Graphics object) IF (!HIDE) DRAW PAINT ELSE DRAW UNHIDE BUTTON Thanks, I already got the problem fixed myself, just never posted that I did. Link to comment Share on other sites More sharing options...