About Store Forum Documentation Contact
Donations:
158$/mo



Post Reply 
Hello I have a question about GUI
Author Message
andreadixon825 Offline
Member

Post: #1
Hello I have a question about GUI
Hi, I'm using the esenthel mmo project and I have a question about the game menu and the gui.

What I have done, I have added a button to the game menu gui for a credits.This is what It looks like in the game script in the client.

Code:
SCAST(GuiObjs, T)=UID(3138771494, 1116230840, 2588683394, 2197067714); hide(); Gui+=T; FlagDisable(getWindow(S).flag, WIN_MOVABLE);

      getButton("Options" ).func(Options , T);
      getButton("Controls").func(Controls, T);
      getButton("Exit"    ).func(Exit    , T);
      getButton("Credits" ).func(Credits   , T);
}

I have added the (getButton("Credits").func(Credits , T); But when I click on it, It dose nothing. I'm I doing this the wrong way, I thought that if a add the same name of my button in the gui game menu with the same name as Credits that it would open, I have tried to see how its done with the other buttons in the gui, but they look the same as what I just added. Thank you.

I'm getting a new error now,

Source\Game.cpp(248): error C2065: 'Credits': undeclared identifier [C:\Esenthel\Projects\_Build_\Client\Project.vcxproj]

I have tryed this getButton("Credits").asButton();
and there is no errors but when I click on it nothing happens.
I'm trying to do this my self but I'm getting lost lol grin

so basically I'm having trouble adding more then one button on a gui, I can make a new gui with one button but when it goes down to adding more then one butting thats where I get stock it smile
(This post was last modified: 09-04-2016 08:16 PM by andreadixon825.)
09-04-2016 07:37 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #2
RE: Hello I have a question about GUI
I'm guessing from the error the 'Credits' function has not been previously declared!

The button must be declared and created and the function declared and defined so that when you click on the button the corresponding function can be called.

I don't have access to the mmo code so can't be more specific.
09-10-2016 09:26 AM
Find all posts by this user Quote this message in a reply
Post Reply