This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-02-18 18:40:52

AIOlover
Scratcher
Registered: 2011-05-08
Posts: 100+

Set Cursor To [] block

How do I make this block? I think it could be extremely helpful.


I'm currently http://blocks.scratchr.org/API.php?user=AIOlover&action=onlineStatus&type=text!
big_smile ~AIOlover~ big_smile

Offline

 

#2 2012-02-18 19:23:04

Bklecka
Scratcher
Registered: 2011-08-27
Posts: 1000+

Re: Set Cursor To [] block

you mean

set cursor to [default v]


http://i48.tinypic.com/106ijc9.jpg

Offline

 

#3 2012-02-18 19:23:51

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Set Cursor To [] block

I think this has been suggested before.

Offline

 

#4 2012-02-18 20:10:45

AIOlover
Scratcher
Registered: 2011-05-08
Posts: 100+

Re: Set Cursor To [] block

Bklecka wrote:

you mean

set cursor to [default v]

Yes, that's the block I'm talking about. I've seen that it's in several mods and it looks pretty cool. It was in the list of blocks in the Scratch Wiki for several of the Scratch Modifications.


I'm currently http://blocks.scratchr.org/API.php?user=AIOlover&action=onlineStatus&type=text!
big_smile ~AIOlover~ big_smile

Offline

 

#5 2012-02-18 20:40:56

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Set Cursor To [] block

The code is:

Code:

cursor: t1 
    t1 = 'normal' ifTrue: [^ Cursor normal show].
    t1 = 'working' ifTrue: [^ Cursor wait show].
    t1 = 'crosshair' ifTrue: [^ Cursor crossHair show].
    t1 = 'read' ifTrue: [^ Cursor read show].
    t1 = 'write' ifTrue: [^ Cursor write show].
    t1 = 'eyedropper' ifTrue: [^ Cursor eyedropper show].
    t1 = 'execute' ifTrue: [^ Cursor execute show].
    t1 = 'origin' ifTrue: [^ Cursor origin show].
    t1 = 'paint bucket' ifTrue: [^ Cursor paintBucket show].
    t1 = 'stamp' ifTrue: [^ Cursor stamp show].
    t1 = 'invisible' ifTrue: [^ Cursor blank show].
    t1 = 'right arrow' ifTrue: [^ Cursor rightArrow show].
    t1 = 'square' ifTrue: [^ Cursor square show].
    t1 = 'down arrow' ifTrue: [^ Cursor down show].
    t1 = 'up arrow' ifTrue: [^ Cursor up show].
    t1 = 'marker' ifTrue: [^ Cursor marker show].
    t1 = 'move' ifTrue: [^ Cursor move show].
    t1 = 'question mark' ifTrue: [^ Cursor questionMark show].
    t1 = 'menu' ifTrue: [^ Cursor menu show].
    t1 = 'hand' ifTrue: [^ Cursor handOpen show].
    t1 = 'fist' ifTrue: [^ Cursor handClosed show].
    t1 = 'corner' ifTrue: [^ Cursor corner show].
    t1 = 'resize diagonal' ifTrue: [^ Cursor resizeCorner show].
    t1 = 'resize horizontal' ifTrue: [^ Cursor resizeHorizontally show].
    ^ Cursor normal show

Also, I totally ripped that off from Bingo, and put it in my own mod.  smile


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#6 2012-02-19 05:58:08

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Set Cursor To [] block

jvvg wrote:

The code is:

Code:

cursor: t1 
    t1 = 'normal' ifTrue: [^ Cursor normal show].
    t1 = 'working' ifTrue: [^ Cursor wait show].
    t1 = 'crosshair' ifTrue: [^ Cursor crossHair show].
    t1 = 'read' ifTrue: [^ Cursor read show].
    t1 = 'write' ifTrue: [^ Cursor write show].
    t1 = 'eyedropper' ifTrue: [^ Cursor eyedropper show].
    t1 = 'execute' ifTrue: [^ Cursor execute show].
    t1 = 'origin' ifTrue: [^ Cursor origin show].
    t1 = 'paint bucket' ifTrue: [^ Cursor paintBucket show].
    t1 = 'stamp' ifTrue: [^ Cursor stamp show].
    t1 = 'invisible' ifTrue: [^ Cursor blank show].
    t1 = 'right arrow' ifTrue: [^ Cursor rightArrow show].
    t1 = 'square' ifTrue: [^ Cursor square show].
    t1 = 'down arrow' ifTrue: [^ Cursor down show].
    t1 = 'up arrow' ifTrue: [^ Cursor up show].
    t1 = 'marker' ifTrue: [^ Cursor marker show].
    t1 = 'move' ifTrue: [^ Cursor move show].
    t1 = 'question mark' ifTrue: [^ Cursor questionMark show].
    t1 = 'menu' ifTrue: [^ Cursor menu show].
    t1 = 'hand' ifTrue: [^ Cursor handOpen show].
    t1 = 'fist' ifTrue: [^ Cursor handClosed show].
    t1 = 'corner' ifTrue: [^ Cursor corner show].
    t1 = 'resize diagonal' ifTrue: [^ Cursor resizeCorner show].
    t1 = 'resize horizontal' ifTrue: [^ Cursor resizeHorizontally show].
    ^ Cursor normal show

Also, I totally ripped that off from Bingo, and put it in my own mod.  smile

How do I get the block to show it as a drop-down menu. I want to add it to my mod.


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#7 2012-02-19 06:24:56

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Set Cursor To [] block

Put this under sensing ops:

Code:

    handNames
        ^ #('default', 'the', 'rest', 'in', 'a', 'list', 'like', 'this', '...' )

And under (Scratch-Blocks -> CommandBlockMorph -> private -> uncoloredArgMorphFor:)
add a line:

Code:

    $j = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #handNames;
             choice: 'default'].

And your blockspec:

Code:

('Set cursor to %j' #- #cursor:)

Good luck!  wink


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#8 2012-02-20 01:37:21

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Set Cursor To [] block

Hardmath123 wrote:

Put this under sensing ops:

Code:

    handNames
        ^ #('default', 'the', 'rest', 'in', 'a', 'list', 'like', 'this', '...' )

And under (Scratch-Blocks -> CommandBlockMorph -> private -> uncoloredArgMorphFor:)
add a line:

Code:

    $j = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #handNames;
             choice: 'default'].

And your blockspec:

Code:

('Set cursor to %j' #- #cursor:)

Good luck!  wink

Ok, thanks  smile


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

Board footer