HeroEngine Forums

HeroEngine Support => Scripting & Programming => Topic started by: EitrGin on Jan 14, 14, 09:40:55 PM

Title: _itemCurrencyValueMap read only in hotspot GUI
Post by: EitrGin on Jan 14, 14, 09:40:55 PM
I'm trying to create items via the spec oracle that the Foundation Framework has laid out, but when using the currency system I can't seem to add a value to the item because the interface is greyed out.

Through the utilities interface: I created an item, glommed the _ValueItemSpecDecorator onto it, and then hit edit. Cannot enter anything for the index/value fields.

Here's where the GUI gets built in _ValueItemSpecDecoratorClassMethods:

Code: [Select]
shared function _createNodePropertyEditorCellForField( fieldName as String ) as NodeRef of Class _GUINodePropertyEditorCell
// Allows a class methods script to create a specific editor cell for a particular field.  The cell must inherit from _GUINodePRopertyEditorCell
//   and implement overrides for methods as needed.

  edit_cell as NodeRef of Class _GUINodePropertyEditorCell
 
  when ToLower(fieldName)
//    is "_itemcurrencyvaluemap"
//      edit_cell = CreateNodeFromPrototype("_nodePropertyEditorCellItemValue")
//      edit_cell.build = true
//    .
  .
 
  return edit_cell
.

It seems as though something is missing. Uncommenting those lines throws an error because it can't find the prototype.
Title: Re: _itemCurrencyValueMap read only in hotspot GUI
Post by: Thazager on Jan 14, 14, 10:59:23 PM
edit_cell = CreateNodeFromPrototype("_nodePropertyEditorCellItemValue")

This might need to be created, as the _nodePropertyEditorCellItemValue is not in the list of GUIs. To search for some options, in the gui editor above the little buttons near bottom, type in _nodeProperty.... and you will start to narrow down the list.

Some of these GUIs might have something close to what you might need, and you might be able to copy part of it. Even if just for the script to work, or you could change the name to something that is already there.
Title: Re: _itemCurrencyValueMap read only in hotspot GUI
Post by: EitrGin on Jan 15, 14, 10:35:34 AM
Yeah, I wasn't sure if I was missing something, or the Foundation Framework was.

I was hoping to not have to build a GUI for it and edit base code that will eventually be overwritten. It might be easier just to make my own currency decorator, considering I'm only going to have one type.
Title: Re: _itemCurrencyValueMap read only in hotspot GUI
Post by: Irushian on May 01, 15, 06:43:09 AM
Edit: The editor isn't complete with the variable types, so the control that it creates is read-only if the list contains no data.