Echo Hollow

Gender-Bending Interactive Stories! :D

User Tools

Site Tools


smutbook:classes:inventory:inventoryui

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
smutbook:classes:inventory:inventoryui [2023/08/09 17:11] leesmutbook:classes:inventory:inventoryui [2023/08/09 17:20] (current) lee
Line 6: Line 6:
  
 FIXME mention the CSS yadda yadda. FIXME mention the CSS yadda yadda.
 +
 +FIXME talk about how the default implementations function.
  
 ===== InventoryUI.render( config ) ===== ===== InventoryUI.render( config ) =====
Line 19: Line 21:
  
 ===== The Configuration Object ===== ===== The Configuration Object =====
 +
 +**Type:** Plain Old Javascript Object (acting as an associative array)
  
 The configuration object is just a plain old javascript object containing a number of configuration fields and their values.  For more information, see the InventoryUI Macro source code. The configuration object is just a plain old javascript object containing a number of configuration fields and their values.  For more information, see the InventoryUI Macro source code.
Line 147: Line 151:
     * //item//: The item we are moving to the right-hand inventory.     * //item//: The item we are moving to the right-hand inventory.
     * //config//: The config object that was passed to InventoryUI.render().     * //config//: The config object that was passed to InventoryUI.render().
-  * **Returns:** String+  * **Returns:** void
   * **Throws:** Nothing   * **Throws:** Nothing
   * **Default Value:** the builtin implementation, defined in InventoryUI.js   * **Default Value:** the builtin implementation, defined in InventoryUI.js
  
-=== moveFromRight( item, config ) ===+==== moveFromRight( item, config ) ====
 Function to call to move item from right to left inventory. If undefined, the built-in implementation will be used. Function to call to move item from right to left inventory. If undefined, the built-in implementation will be used.
-  * Type: Function +  * **Type:** Function 
-  * ReturnsVoid +  * **Arguments:**  
-  * //item//: The item which we are checking whether or not we should show+    * //item//: The item we are moving to the left-hand inventory
-  * //config//: The config object that was passed to InventoryIU.render(). +    * //config//: The config object that was passed to InventoryUI.render(). 
-  * **Default Value:** the builtin implementation is used if none is defined in the config object+  * **Returns:** void 
 +  * **Throws:** Nothing 
 +  * **Default Value:** the builtin implementationdefined in InventoryUI.js
  
-=== leftTitle ===+==== leftTitle ====
 Override the left title. Override the left title.
-  * Type: String Function(config) returning String +  * **Type:** String or Function(config) returning String 
-  * **Default Value:** if the left inventory is a Person then "Soandso (Inventory)", otherwise leftInventory.AName.+  * **Default Value:** if the left inventory is a Person then "Soandso (Inventory)", otherwise leftInventory.AName().
  
-=== rightTitle ===+==== rightTitle ====
 Override the right title. Override the right title.
-  * Type: String Function(config) returning String +  * **Type:** String or Function(config) returning String 
-  * **Default Value:** if the right inventory is a Person then "Soandso (Inventory)", otherwise rightInventory.AName.+  * **Default Value:** if the right inventory is a Person then "Soandso (Inventory)", otherwise rightInventory.AName().
  
-=== leftName( item, config ) ===+==== leftName( item, config ) ====
 Override the left label for item. Override the left label for item.
-  * Type: Function +  * **Type:** Function 
-  * ReturnsString +  * **Arguments:**  
-  * //item//: The item which we are checking whether or not we should show+    * //item//: The item we want the label for
-  * //config//: The config object that was passed to InventoryIU.render(). +    * //config//: The config object that was passed to InventoryUI.render(). 
-  * **Default Value:** the item'AName+  * **Returns:** String 
 +  * **Throws:** Nothing 
 +  * **Default Value:** the item.AName()
  
-=== rightName( item, config ) ===+==== rightName( item, config ) ====
 Override the right label for item. Override the right label for item.
-  * Type: Function +  * **Type:** Function 
-  * ReturnsString +  * **Arguments:**  
-  * //item//: The item which we are checking whether or not we should show+    * //item//: The item we want the label for
-  * //config//: The config object that was passed to InventoryIU.render(). +    * //config//: The config object that was passed to InventoryUI.render(). 
-  * **Default Value:** the item'AName+  * **Returns:** String 
 +  * **Throws:** Nothing 
 +  * **Default Value:** the item.AName()
  
-=== outerTpl ===+==== outerTpl ====
 Override the builtin outer HTML template. Override the builtin outer HTML template.
-  * Type: String Function(config) returning String+  * **Type:** String or Function(config) returning String
   * **Default Value:** undefined   * **Default Value:** undefined
  
-=== listitemTplLeft ===+==== listitemTplLeft ====
 Override the builtin left list item HTML template. Override the builtin left list item HTML template.
-  * Type: String Function(config) returning String+  * **Type:** String or Function(config) returning String
   * **Default Value:** undefined   * **Default Value:** undefined
  
-=== listitemTplRight ===+==== listitemTplRight ====
 Override the builtin right list item HTML template. Override the builtin right list item HTML template.
-  * Type: String | Function(config) returning String+  * **Type:** String | Function(config) returning String
   * **Default Value:** undefined   * **Default Value:** undefined
  
-=== detailsTpl ===+==== detailsTpl ====
 Override the builtin item details HTML template. Override the builtin item details HTML template.
-  * Type: String | Function(config) returning String+  * **Type:** String | Function(config) returning String
   * **Default Value:** undefined   * **Default Value:** undefined
- 
- 
- 
- 
- 
- 
-==== .someFunction( args ) ==== 
-Description. 
- 
-  * **Type:** Function 
-  * **Arguments:**  
-    * //arg1//: desc 
-    * //arg2//: desc 
-    * //arg3//: desc 
-    * //arg4//: desc 
-    * //arg5//: desc 
-    * //arg6//: desc 
-  * **Returns:** void 
-  * **Throws:** Nothing 
- 
-Example:<code> 
-FIXME 
-</code> 
- 
  
smutbook/classes/inventory/inventoryui.1691626287.txt.gz · Last modified: 2023/08/09 17:11 by lee