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

Author Topic: CS CE GUI  (Read 1539 times)

craigbe

  • Developers
  • *
  • Posts: 69
    • View Profile
CS CE GUI
« on: Feb 26, 13, 05:34:26 PM »

Hows that for abbreviations?? lol

Can someone point me to the code that comes with the default clean engine that handles the radio button selections in the character selection area?

I've been throwing in '$ALERT's and '$CHAT's with no avail..

thanks for any info!

Craig
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1150
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: CS CE GUI
« Reply #1 on: Feb 26, 13, 09:10:46 PM »

I have been searching for those in code also with no luck.  I did make my own using it as a base. I can then use it with _onButtonClick().
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: CS CE GUI
« Reply #2 on: Feb 27, 13, 05:31:51 AM »

Craig,

Check out _GUICSSCharacterSelectionClassMethods, method _OnButtonMouseClick().  That handles when the user clicks the Login button and then it uses _cssGetSelectedCharacterName() to simply read which one of the different name radio buttons is selected at the time.

So, the clean engine is not actually doing anything at the time when you click the radio buttons.

If you want to do something when the radio buttons are clicked, such as play a sound, your best bet is as Thazager said: creating your own gui and having its class define a method to catch the event.

However, _OnButtonMouseClick() only catches clicks of normal buttons.  For radio button clicks, you need to define method _onRadioButtonMouseClick(args references Class GUIMouseEvent).  There are other similar methods for catching other events specific to radio buttons, and that also applies to check boxes.
« Last Edit: Feb 27, 13, 05:35:36 AM by ScottZarnke »
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

craigbe

  • Developers
  • *
  • Posts: 69
    • View Profile
Re: CS CE GUI
« Reply #3 on: Feb 27, 13, 08:24:09 AM »

Great, thanks!!

Craig
Logged

craigbe

  • Developers
  • *
  • Posts: 69
    • View Profile
Re: CS CE GUI
« Reply #4 on: Mar 01, 13, 08:23:30 AM »

I started a new custom gui and figured I would copy the xml from the default but I am having trouble finding it in the repository.  Can someone point me to it?  Whats the name of the CS panel?

Thanks,

Craig
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: CS CE GUI
« Reply #5 on: Mar 01, 13, 11:31:18 AM »

You don't find it in the repository, you find it in the Script Editor.  It's called _cssCharacterSelection.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

craigbe

  • Developers
  • *
  • Posts: 69
    • View Profile
Re: CS CE GUI
« Reply #6 on: Mar 01, 13, 11:46:55 AM »

Thanks Scott. l I'm having trouble seeing how the default CS panel is pulling the names to populate the screen. 

The _cssGetSelectedCharacterName() never seems to get called, or my $ALERT is broken.

Craig
Logged