# HG changeset patch # User Claus Gittinger # Date 1579181553 -3600 # Node ID 7ab1983c012debf9bd249154ce6dd45a5974aca4 # Parent 9a007c162c5a78e170bb76954a432054d6914645 #FEATURE by cg class: DisplaySurface added: #flashRectangle: diff -r 9a007c162c5a -r 7ab1983c012d DisplaySurface.st --- a/DisplaySurface.st Tue Jan 14 11:19:00 2020 +0100 +++ b/DisplaySurface.st Thu Jan 16 14:32:33 2020 +0100 @@ -1,3 +1,5 @@ +"{ Encoding: utf8 }" + " COPYRIGHT (c) 1992 by Claus Gittinger All Rights Reserved @@ -1360,6 +1362,28 @@ "Modified: 4.6.1996 / 17:58:49 / cg" ! +flashRectangle:rect + "flash part of the view - fill it flashColor, then white, + finally redraw. + Can be used to bring attention to some line/part of view" + + self xoring:[ + self fillRectangle:rect color:(self blackColor). + ]. + + Delay waitForSeconds:0.1. + + self xoring:[ + self fillRectangle:rect color:(self blackColor). + ]. + Delay waitForSeconds:0.1. + + " + Display rootView flashRectangle:(10@10 corner:100@100) + Display rootView flashRectangle:(100@100 corner:200@300) + " +! + redraw "nothing done here" ^ self