computor Posted December 16, 2014 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.
Precise Posted December 16, 2014 Posted December 16, 2014 Post what you have so far and people will help you. (Mouselistener?)
TheScrub Posted December 18, 2014 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
computor Posted December 19, 2014 Author 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.