diff --git a/README.md b/README.md index 16049ac..bdccaa3 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ Shoes.app { } } ``` + Stacks are essential! The most important two elements in Shoes are *stacks* and *flows*. @@ -63,6 +64,7 @@ Shoes.app { } } ``` + We also painted the *background* white. Did you see that? @@ -86,6 +88,7 @@ Shoes.app { ) } ``` + The Shoes brush always starts out black. @@ -93,7 +96,7 @@ Notice that while buttons just dropped into the window, we drew the circle at a ---------------------- -![005.jpg](https://github.com/spiralofhope/shoes_tutorial_walkthrough/raw/master/imgs/005.jpg) +![005.png](https://github.com/spiralofhope/shoes_tutorial_walkthrough/raw/master/imgs/005.png) Now, a rectangle and an arrow. @@ -112,6 +115,7 @@ Shoes.app { ) } ``` + The *fill* is red on these shapes. And the *stroke* is black. (Because we didn't change it.) These two pens - stroke and fill - draw every shape. @@ -123,6 +127,8 @@ TODO: Change the colour of the two shapes. Then update the screenshot. ---------------------- +![Aaaa. My sweet children, I have kidnapped you! And brought you to my secret Shoes study class!!](https://github.com/spiralofhope/shoes_tutorial_walkthrough/raw/master/imgs/nks-kidnap.png) + Of course, you can always design your app with an *image*. Even images from the web! ```ruby @@ -130,18 +136,19 @@ Shoes.app { image "http://spiralofhope.com/i/ruby-shoes--nks-kidnap.png" } ``` + -![Aaaa. My sweet children, I have kidnapped you! And brought you to my secret Shoes study class!!](https://github.com/spiralofhope/shoes_tutorial_walkthrough/raw/master/imgs/nks-kidnap.png) - Shoes even caches images in memory and on disk, like browsers do. Images are loaded in background threads as well, to prevent apps from slowing down. ---------------------- +![007.png](https://github.com/spiralofhope/shoes_tutorial_walkthrough/raw/master/imgs/007.png) + Now, a very important element: the *para*. As in: paragraph. Probably the third most important element (after stacks and flows.) ```ruby @@ -149,11 +156,12 @@ Shoes.app { para strong("Q."), " Are you beginning to grasp hold of Shoes?" } ``` - -![007.png](https://github.com/spiralofhope/shoes_tutorial_walkthrough/raw/master/imgs/007.png) + ---------------------- +![008.png](https://github.com/spiralofhope/shoes_tutorial_walkthrough/raw/master/imgs/008.png) + Beyond para, you've got *title* and *subtitle*, which are bigger fonts. You can add a bunch of font styles as well. Look for *strong* and *em* in this bit. ```ruby @@ -165,8 +173,7 @@ Shoes.app { } } ``` - -![008.png](https://github.com/spiralofhope/shoes_tutorial_walkthrough/raw/master/imgs/008.png) + ---------------------- @@ -180,6 +187,7 @@ Shoes.app { @note = para "Nothing pushed so far" } ``` + ---------------------- @@ -196,6 +204,7 @@ Shoes.app { } } ``` + ---------------------- @@ -215,6 +224,7 @@ Shoes.app do ) end ``` + In this example, I used *do* and end *rather* than the braces `{` and `}`. They have the same meaning. @@ -240,10 +250,14 @@ Shoes.app do end end ``` + ---------------------- ![013.png](https://github.com/spiralofhope/shoes_tutorial_walkthrough/raw/master/imgs/013.png) + In this one, we make a five-point star. And it follows the mouse around as you move. @@ -255,9 +269,15 @@ Shoes.app do end end ``` + ---------------------- +![014.png](https://github.com/spiralofhope/shoes_tutorial_walkthrough/raw/master/imgs/014.png) + + On to a taste of animation. The Shoes icon moves randomly a bunch of times each second. ```ruby @@ -273,14 +293,14 @@ Shoes.app do end end ``` - -![014.png](https://github.com/spiralofhope/shoes_tutorial_walkthrough/raw/master/imgs/014.png) + ---------------------- ![015.png](https://github.com/spiralofhope/shoes_tutorial_walkthrough/raw/master/imgs/015.png) Remember a few examples ago when we handled a button click? How about doing the same with a link? @@ -305,12 +325,16 @@ The scenery." ) end ``` + So, when the link gets clicked, the stack gets cleared. The poem will disappear. ---------------------- ![016.png](https://github.com/spiralofhope/shoes_tutorial_walkthrough/raw/master/imgs/016.png) + Okay, last one for now. Let's generate a hundred random circles. This example also uses the *rgb* method to make colors from red, green and blue fractions. @@ -328,6 +352,7 @@ Shoes.app(:width => 300, :height => 400) do end end ``` + Don't worry if you haven't picked up a whole lot reading through these. To get the hang of it, you'll need to alter these yourself. Try fiddling with the numbers and colors. Experiment, you know? @@ -344,4 +369,6 @@ The pdf should be hosted under direct control, probably shoesrb.com diff --git a/imgs/001.png b/imgs/001.png new file mode 100644 index 0000000..084c6ba Binary files /dev/null and b/imgs/001.png differ