@@ -75,6 +75,7 @@ namespace Inventory {
7575 //% block="%Inventory(Item) set text of %attribute to %value"
7676 //% weight=20
7777 //% group="Item"
78+ //% hidden
7879 set_text ( attribute : ItemTextAttribute , value : string ) {
7980 if ( attribute == ItemTextAttribute . Name ) {
8081 this . name = value ;
@@ -85,10 +86,12 @@ namespace Inventory {
8586
8687 /**
8788 * Get the name of description of the item.
89+ * @return : The text.
8890 */
8991 //% block="%Inventory(Item) get text of %attribute"
9092 //% weight=10
9193 //% group="Item"
94+ //% hidden
9295 get_text ( attribute : ItemTextAttribute ) {
9396 if ( attribute == ItemTextAttribute . Name ) {
9497 return this . name ;
@@ -106,23 +109,27 @@ namespace Inventory {
106109 //% new_image.shadow=screen_image_picker
107110 //% weight=40
108111 //% group="Item"
112+ //% hidden
109113 set_image ( new_image : Image ) {
110114 this . image = new_image ;
111115 }
112116
113117 /**
114118 * Get the image of the item.
119+ * @return : The image.
115120 */
116121 //% block="%Inventory(Item) get image"
117122 //% weight=30
118123 //% group="Item"
124+ //% hidden
119125 get_image ( ) {
120126 return this . image ;
121127 }
122128 }
123129
124130 /**
125- * Create a new item - for blocks.
131+ * Create a new item - for blocks. Only rewrapped for blocks.
132+ * @return : A new Inventory.Item.
126133 */
127134 //% block="create item with name %name and %image || with description %description"
128135 //% blockSetVariable=item
@@ -132,6 +139,7 @@ namespace Inventory {
132139 //% description.dfl="Description"
133140 //% weight=50
134141 //% group="Item"
142+ //% hidden
135143 export function create_item ( name : string , image : Image , description : string = null ) {
136144 return new Item ( name , image , description )
137145 }
@@ -186,10 +194,12 @@ namespace Inventory {
186194
187195 /**
188196 * Get the items in the toolbar. Only rewrapped for blocks.
197+ * @return : The items, as an array of Item.
189198 */
190199 //% block="%Inventory(toolbar) get items"
191200 //% weight=80
192201 //% group="Toolbar"
202+ //% hidden
193203 public get_items ( ) {
194204 return this . items ;
195205 }
@@ -209,6 +219,7 @@ namespace Inventory {
209219 //% new_items.shadow="lists_create_with"
210220 //% weight=90
211221 //% group="Toolbar"
222+ //% hidden
212223 public set_items ( new_items : Item [ ] ) {
213224 this . items = new_items ;
214225 }
@@ -230,10 +241,13 @@ namespace Inventory {
230241
231242 /**
232243 * Set the selected index or max items. Only rewrapped for blocks.
244+ * @attribute : A property of the ToolbarNumberAttribute enum.
245+ * @value : The new value.
233246 */
234247 //% block="%Inventory(toolbar) set %attribute to %value"
235248 //% weight=70
236249 //% group="Toolbar"
250+ //% hidden
237251 public set_number ( attribute : ToolbarNumberAttribute , value : number ) {
238252 if ( attribute == ToolbarNumberAttribute . SelectedIndex ) {
239253 this . selected = value ;
@@ -244,10 +258,13 @@ namespace Inventory {
244258
245259 /**
246260 * Get the selected index or max items. Only rewrapped for blocks.
261+ * @attribute : A property of the ToolbarNumberAttribute enum.
262+ * @return : A number.
247263 */
248264 //% block="%Inventory(toolbar) get %attribute"
249265 //% weight=60
250266 //% group="Toolbar"
267+ //% hidden
251268 public get_number ( attribute : ToolbarNumberAttribute ) {
252269 if ( attribute == ToolbarNumberAttribute . SelectedIndex ) {
253270 return this . selected ;
@@ -280,7 +297,7 @@ namespace Inventory {
280297 /**
281298 * Get the color of a specific part of the toolbar.
282299 * @param attribute: A property of the ToolbarColorAttribute enum.
283- * @return : The color (which is a number) of the attribute, otherwise -1.
300+ * @return : The color (which is a number) of the attribute, otherwise -1.
284301 */
285302 //% block="%Inventory(toolbar) get color of %attribute"
286303 //% weight=40
@@ -341,13 +358,15 @@ namespace Inventory {
341358
342359 /**
343360 * Create a new toolbar - for blocks.
361+ * @return : A new Toolbar.
344362 */
345363 //% block="create toolbar with items %items and max items %max_items"
346364 //% blockSetVariable=toolbar
347365 //% items.shadow="lists_create_with"
348366 //% max_items.dfl=3
349367 //% weight=100
350368 //% group="Toolbar"
369+ //% hidden
351370 export function create_toolbar ( items : Item [ ] , max_items : number ) {
352371 return new Toolbar ( items , max_items ) ;
353372 }
@@ -404,10 +423,12 @@ namespace Inventory {
404423
405424 /**
406425 * Get the items in the inventory. Only rewrapped for blocks.
426+ * @return : The items - as an array of Item.
407427 */
408- //% block="%Inventory(Inventory ) get items"
428+ //% block="%Inventory(inventory ) get items"
409429 //% weight=80
410430 //% group="Inventory"
431+ //% hidden
411432 public get_items ( ) {
412433 return this . items ;
413434 }
@@ -420,10 +441,15 @@ namespace Inventory {
420441 this . update ( ) ;
421442 }
422443
423- //% block="%Inventory(Inventory) set items to %new_items"
444+ /**
445+ * Set the items in the inventory. Only rewrapped for blocks.
446+ * @new_items : A list of Item.
447+ */
448+ //% block="%Inventory(inventory) set items to %new_items"
424449 //% new_items.shadow="lists_create_with"
425450 //% weight=90
426451 //% group="Inventory"
452+ //% hidden
427453 public set_items ( new_items : Item [ ] ) {
428454 this . items = new_items ;
429455 }
@@ -445,10 +471,13 @@ namespace Inventory {
445471
446472 /**
447473 * Set the selected index or max items. Only rewrapped for blocks.
474+ * @attribute : A property of the InventoryNumberAttribute enum.
475+ * @value : The new number.
448476 */
449- //% block="%Inventory(Inventory ) set %attribute to %value"
477+ //% block="%Inventory(inventory ) set %attribute to %value"
450478 //% weight=70
451479 //% group="Inventory"
480+ //% hidden
452481 public set_number ( attribute : InventoryNumberAttribute , value : number ) {
453482 if ( attribute == InventoryNumberAttribute . SelectedIndex ) {
454483 this . selected = value ;
@@ -459,10 +488,13 @@ namespace Inventory {
459488
460489 /**
461490 * Get the selected index or max items. Only rewrapped for blocks.
491+ * @attribute : A property of the InventoryNumberAttribute enum.
492+ * @return : The number.
462493 */
463- //% block="%Inventory(Inventory ) get %attribute"
494+ //% block="%Inventory(inventory ) get %attribute"
464495 //% weight=60
465496 //% group="Inventory"
497+ //% hidden
466498 public get_number ( attribute : InventoryNumberAttribute ) {
467499 if ( attribute == InventoryNumberAttribute . SelectedIndex ) {
468500 return this . selected ;
@@ -481,10 +513,12 @@ namespace Inventory {
481513
482514 /**
483515 * Get the text in the inventory. Only rewrapped for blocks.
516+ * @return : A string.
484517 */
485- //% block="%Inventory(Inventory ) get text"
518+ //% block="%Inventory(inventory ) get text"
486519 //% weight=40
487520 //% group="Inventory"
521+ //% hidden
488522 public get_text ( ) {
489523 return this . text ;
490524 }
@@ -499,10 +533,12 @@ namespace Inventory {
499533
500534 /**
501535 * Set the text in the inventory. Only rewrapped for blocks.
536+ * @new_text : The new text.
502537 */
503- //% block="%Inventory(Inventory ) set text to %new_text"
538+ //% block="%Inventory(inventory ) set text to %new_text"
504539 //% weight=50
505540 //% group="Inventory"
541+ //% hidden
506542 public set_text ( new_text : string ) {
507543 this . text = new_text ;
508544 }
@@ -512,7 +548,7 @@ namespace Inventory {
512548 * @param attribute: A property of the InventoryColorAttribute enum.
513549 * @param color: A number which should be the new color of the attribute.
514550 */
515- //% block="%Inventory(Inventory ) set color of %attribute to %color"
551+ //% block="%Inventory(inventory ) set color of %attribute to %color"
516552 //% color.shadow=colorindexpicker
517553 //% weight=30
518554 //% group="Inventory"
@@ -532,9 +568,9 @@ namespace Inventory {
532568 /**
533569 * Get the color of a specific part of the inventory.
534570 * @param attribute: A property of the InventoryColorAttribute enum.
535- * @return : The color (which is a number) of the attribute, otherwise -1.
571+ * @return : The color (which is a number) of the attribute, otherwise -1.
536572 */
537- //% block="%Inventory(Inventory ) get color of %attribute"
573+ //% block="%Inventory(inventory ) get color of %attribute"
538574 //% weight=20
539575 //% group="Inventory"
540576 public get_color ( attribute : InventoryColorAttribute ) {
@@ -595,6 +631,7 @@ namespace Inventory {
595631 //% max_items.dfl=3
596632 //% weight=100
597633 //% group="Inventory"
634+ //% hidden
598635 export function create_inventory ( items : Item [ ] , max_items : number ) {
599636 return new Inventory ( items , max_items ) ;
600637 }
0 commit comments