static/manual-en.txt in green_shoes-0.201.0 vs static/manual-en.txt in green_shoes-0.207.0
- old
+ new
@@ -1333,15 +1333,30 @@
=== :hidden » true or false ===
For: ''all slots and elements''.
-Hides or shows this object. Any object with `:hidden => true` are not
+Hides or shows this object. Any object with `hidden: true` are not
displayed on the screen. Neither are its children.
-'''Note:''' Green Shoes doesn't support `:hidden` style.
+{{{
+ Shoes.app do
+ slot = stack hidden: true do
+ title 'hello'
+ flow do
+ image File.join DIR, '../samples/loogink.png'
+ end
+ para link('Go go!'){alert 'hi'}
+ end
+ timer(2){slot.show}
+ timer(5){slot.hide}
+ end
+}}}
+'''Note:''' Green Shoes supports `:hidden` style for only slots, shapes, textblocks
+and images so far.
+
=== :inner » a number ===
For: ''star''.
The size of the inner radius (in pixels.) The inner radius describes the solid
@@ -3345,11 +3360,12 @@
{{{
#!ruby
Shoes.app do
para "Nice, nice, very nice. Busy, busy, busy."
- image "../static/shoes-manual-apps.png"
+ image File.join DIR,
+ "../static/shoes-manual-apps.png"
end
}}}
When you load any image into Green Shoes, it is cached in memory. This means that if
you load up many image elements from the same file, it'll only really load the
@@ -3673,9 +3689,41 @@
An alias for [[TextBlock.text]]. Returns a flattened string of all of this
TextBlock's contents.
'''Note:''' Green Shoes doesn't support `to_s` method.
+
+=== cursor() » an index ===
+
+Return a text cursor position. That is an index of the text which is a string
+of all of the characters in this text box.
+
+=== cursor = an index or nil ===
+
+Shows or hides the text cursor.
+Using `cursor = 3`, for instance, shows the text cursor at index 3 from the front.
+Using `cursor = -1` shows the text cursor at the end of the text.
+Using `cursor = nil` hides the text cursor.
+
+{{{
+ Shoes.app do
+ msg = para 'hello ' * 20
+ msg.cursor = -1
+ keypress do |k|
+ n = case k
+ when 'Left'; -1
+ when 'Right'; 1
+ else
+ next
+ end
+ n += msg.cursor
+ len = msg.text.length
+ n = len unless n > -1
+ msg.cursor = n % (len+1)
+ flush
+ end
+ end
+}}}
== Timers ==
Green Shoes contains three timers: the animate, every and
timer. Both animate and every loop over and over after they