HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Grogard

Pages: 1 2 [3]
Hello. I have the next code when I click the button:
Code: [Select]
is "btnLogout"
      confirm as NodeRef of Class _ConfirmDialog = $ALERT._ConfirmDialog("confirmExit", "Выход", "Выйти из игры?")
      confirm._confirmDialogOwner = me
      args.handled = true

And havwe the method on this GUI class:
Code: [Select]
method HE_ConfirmDialogAccepted()
  SendCommand( "/exit" )

method HE_ConfirmDialogDeclined()
  // Nothing to do here but let the dialog close.

But the i click any button i get this message in Error console:
Code: [Select]
!ERROR!System:GUIXMLChomper::ChompControlAttributeDynamicly: Invalid script "*None*". Field "_confirmdialogreturnscript" Prototype "_confirmDialog"

So what i do wrong?

Design & World Building / [] Localization Table Editor
« on: Jan 07, 13, 06:29:14 AM »

I want to fill the "Localization Table Editor" but when I open it, it always Empty. Ig I try To add text, nothing happend. What I do wrong?

Ok. I try this.

Can you answer how can i remove my created GUI Prototype. I remover the linked class. But I can't found how to remove GUI Window.

You need to add ObsListener as a parent in your GUI class in the DOM.

I Add, but get the same error.

The parent class for my My GUI class is _GUIBaseWindow such as _GUICSSCharacterSelection from this class i copy my code.

Hello to All.

I'm new to HE.
So I create my impl of CSS.

I create new GUI window and class for it.
Code: [Select]
public function Open( args as LookupList indexed by String of String ) as NodeRef of Class GUIControl
// typically args["names"] will contain a list of character names to populate the control
//  additional information may be included depending on game specific implementations
  css as NodeRef of Class GUIControl = CreateNodeFromPrototype( "GUI_DM_CharacterSelectionWindow" )
  css.build = true
  css.centerControlOver( 0 )

  //names as List of String
  //unmarshal names from args["names"]
  //css._cssPopulateNamesList( names )

  //var loginButton = css._cssGetLoginButton()
  //SetKeyboardFocus( loginButton )
  var listener = $CHARACTERSELECTIONSYSTEM.createNodeListener( css, false )
  addAssociation( css, "base_hard_association", listener )
  $CHARACTERSELECTIONSYSTEM.addListener( listener )
  return css

method _OnButtonMouseClick(button as NodeRef of Class _GUIButton, args references Class GUIMouseEvent)
  when button.name
    is "loginCharacter"
      // Tell the server to load normally or into a clean test area
//      $CHARACTERSELECTIONSYSTEM._CSSRequestSetLoadInCleanTestArea( me._cssIsCleanChecked(), None )
//      var listener = $CHARACTERSELECTIONSYSTEM.createNodeListener( me, false )
//      $CHARACTERSELECTIONSYSTEM._CSSRequestSelectCharacter( me._cssGetSelectedCharacterName(), listener )
//      // Until chat buffering is set to false, no chat messages will be displayed in the
//      //   chat panel or your game specific chat
//      $BASECLIENT._setChatBuffering( false )
    is "createCharacter"
//      arguments as LookupList indexed by String of String
//      var listener = $CHARACTERSELECTIONSYSTEM.createNodeListener( me, false )
//      $CHARACTERSELECTIONSYSTEM._CSSRequestCreateCharacter( arguments, listener )
    is "deleteCharacter"
//      if me._cssGetSelectedCharacterName() = ""
//        $ALERT._CleanModalAlert( "No character is selected." )
//      else
//        var listener = $CHARACTERSELECTIONSYSTEM.createNodeListener( me, false )
//        $CHARACTERSELECTIONSYSTEM.addListener( listener )
//        me._cssShowDeleteCharacterWarning( me._cssGetSelectedCharacterName() )
//      .
    is "cancelDelete"
//      DestroyNode( button.rootParent() )
    is "deleteConfirm"
//      $CHARACTERSELECTIONSYSTEM._CSSConfirmDeleteCharacter()
//      DestroyNode( button.rootParent() )
      ScriptError( "Unknown button: " + button.name + "." )

method EventRaised( obs as NodeRef of Class ObsSubject, data as NodeRef )
// NOTE The data passed in is "owned" by the observer pattern and will be deleted at
//        when the notifications are complete.  No listener should try to persist this
//        data node rather it should copy the data if it needs it beyond script execution.
  where data
    is kindof eventObject
      when data.eventType
//          DestroyNode( me )
//          destroyNode( me )
//          me._cssPopulateNamesList( $CHARACTERSELECTIONSYSTEM._CSSGetCharacterList() )
//          me._cssPopulateNamesList( $CHARACTERSELECTIONSYSTEM._CSSGetCharacterList() )
//          println("Got delete confirmation event")
//          $CHARACTERSELECTIONSYSTEM._CSSRequestDeleteCharacter( me._cssGetSelectedCharacterName(), None )
          println("Got event: " + data.eventType + " but I don't know what to do now?")
      ScriptError( "unknown data node type, no clue how to handle this" )

And when window open i get the next error:
Code: [Select]
Client Script Error
SCRIPT ERROR: In function ScriptError: Something created a listener for 1000000027 but that node's classes did not implement the method "EventRaised" nor the Shared Function "EventRaisedNotify"?
01/05/2013 20:21:35
Call trace:
  Script obsListenerNodeClassMethods line 80 me[id=1000000035 invalid]
  Script obsSubjectClassMethods line 209 me[id=1000000014 class=_characterSelection,DM_CharacterSelectionSystem]
  Script _characterSelectionClassMethods line 73 me[1000000014]
  Script _characterSelectionClassMethods line 79 me[1000000014]
  Script _characterSelectionClassMethods line 50 me[0]

But my class have this method EventRaised see abovwe for code.

I invoke this window by code:
Code: [Select]
method HE_CSSInvokeGUI( args as LookupList indexed by String of String ) as Boolean
// Used to invoke the character selection gui.  The args passed in are the args that where passed
//   to the client system node by the _CSSInvokeGUI method on the server node which could be extended/overridden
//   by implementing the HE_CSSInvokeGUI method on the server and adding whatever data is needed to a remote call that
//   the override makes to the client system node.
// return true to indicate you handled everything ie popped up your game-specific gui
  //css as NodeRef of Class GUIControl = createNodeFromPrototype("GUI_DM_CharacterSelectionWindow")
  css as NodeRef of Class GUIControl = GUI_DM_CharacterSelectionWindowClassMethods:Open( args )
  return true

What i do wrong. And also "_OnButtonMouseClick" never invoke - why?

Pages: 1 2 [3]