Could someone point me in the right direction regarding how I might change the
red screen Croquet displays as the island loads? Say I wanted to replace that with a green screen? or an image? Best regards, Rich ====== |
Well,
Since the red window also says: 'Waiting for connection...', try typing that (without the quotes) and hitting CRTL-e. One method pops up: CroquetParticipant>>drawOn: drawOn: aCanvas (harness == nil or:[harness doRender not]) ifTrue:["still waiting for connection" super drawOn: aCanvas. ^aCanvas drawString: 'Waiting for connection...' at: bounds origin. ]. ... more stuff not of interest here ... So, instead of super drawOn: and aCanvas drawString:, you could substitute more pleasing graphics here. Cheers, Bob On Nov 10, 2007, at 9:00 AM, [hidden email] wrote: > Could someone point me in the right direction regarding how I might > change the > red screen Croquet displays as the island loads? Say I wanted to > replace that > with a green screen? or an image? > > Best regards, > Rich > ====== |
Fantastic... thank you Bob! .... what function might I look to use
here at the 'Waiting for connection...' location to substitute a .jpg image instead or text? Thanks so much for your help ... I know this is more of a Squeak question than a specific Croquet question. ======== On Nov 10, 2007 8:12 AM, Bob Arning <[hidden email]> wrote: > Well, > > Since the red window also says: 'Waiting for connection...', try > typing that (without the quotes) and hitting CRTL-e. One method pops up: > > CroquetParticipant>>drawOn: > > drawOn: aCanvas > > (harness == nil or:[harness doRender not]) ifTrue:["still waiting > for connection" > super drawOn: aCanvas. > ^aCanvas drawString: 'Waiting for connection...' at: bounds origin. > ]. > ... more stuff not of interest here ... > > So, instead of super drawOn: and aCanvas drawString:, you could > substitute more pleasing graphics here. > > Cheers, > Bob > > > On Nov 10, 2007, at 9:00 AM, [hidden email] wrote: > > > Could someone point me in the right direction regarding how I might > > change the > > red screen Croquet displays as the island loads? Say I wanted to > > replace that > > with a green screen? or an image? > > > > Best regards, > > Rich > > ====== > > |
Here's an example:
=================== drawOn: aCanvas | pic | (harness == nil or:[harness doRender not]) ifTrue:["still waiting for connection" pic _ ScriptingSystem formAtKey: #GoPic. aCanvas fillRectangle: self bounds color: Color yellow; translucentImage: pic at: self extent - pic extent // 2 + bounds origin. ^self ]. lastBounds ~= self bounds ifTrue:[ lastBounds := self bounds. harness bounds: self bounds. ]. harness render. Display addExtraRegion: bounds for: self. ==================== You could get <pic> from a file using "Form fromFileNamed: '/foo/bar/ my.jpg'" or build it into your Croquet image so you don't need to have the file available every time you startup. Cheers, Bob On Nov 10, 2007, at 9:43 AM, Rich White wrote: > Fantastic... thank you Bob! .... what function might I look to use > here at the 'Waiting for connection...' location to substitute a .jpg > image instead or text? Thanks so much for your help ... I know this > is more of a Squeak question than a specific Croquet question. > > > ======== > > On Nov 10, 2007 8:12 AM, Bob Arning <[hidden email]> wrote: >> Well, >> >> Since the red window also says: 'Waiting for connection...', try >> typing that (without the quotes) and hitting CRTL-e. One method >> pops up: >> >> CroquetParticipant>>drawOn: >> >> drawOn: aCanvas >> >> (harness == nil or:[harness doRender not]) ifTrue:["still >> waiting >> for connection" >> super drawOn: aCanvas. >> ^aCanvas drawString: 'Waiting for connection...' >> at: bounds origin. >> ]. >> ... more stuff not of interest here ... >> >> So, instead of super drawOn: and aCanvas drawString:, you could >> substitute more pleasing graphics here. >> >> Cheers, >> Bob >> >> >> On Nov 10, 2007, at 9:00 AM, [hidden email] wrote: >> >>> Could someone point me in the right direction regarding how I might >>> change the >>> red screen Croquet displays as the island loads? Say I wanted to >>> replace that >>> with a green screen? or an image? >>> >>> Best regards, >>> Rich >>> ====== >> >> |
Free forum by Nabble | Edit this page |