Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-26-2012, 07:34 AM
devilsknite1 devilsknite1 is offline
C:
devilsknite1's Avatar
Join Date: Jul 2006
Location: Florida, USA
Posts: 269
devilsknite1 has a spectacular aura about
Send a message via AIM to devilsknite1 Send a message via MSN to devilsknite1 Send a message via Yahoo to devilsknite1
useOwnProfile taking over default?

When changing a GuiContextMenuCtrl textprofile's font size, color, and style via useownprofile, when right clicking on the accounts in the in-game playerlist and viewing player profiles, those attributes carry over. How do I limit this to only the GuiContextMenuCtrl I've created? Here's a snippet of what I've done; maybe I'm just doing it incorrectly?

PHP Code:
new GuiContextMenuCtrl"Guild_Menu" ) {
    
useOwnProfile true;
    
profile GuiBluePopUpMenuProfile;
    
textprofile GuiBlueTextListProfile;
    
textprofile.fontSize 15;
    
textprofile.fontColor "orange";
    
textprofile.fontStyle "bold"
I understand I'm modifying the GuiBlueTextListProfile, but that's only because (obviously) I need the qualities from it. I only want that useownprofile to effect that GuiContextMenuCtrl. Any ideas?
Reply With Quote
  #2  
Old 07-26-2012, 11:49 AM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
I always put useownprofile = true; under the profile you're working with, and that always works for me.

PHP Code:
new GuiWindowCtrl("Window") {
  
profile GuiBlueWindowProfile;
  
useownprofile true;

__________________
Reply With Quote
  #3  
Old 07-26-2012, 11:54 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Emera, I was thinking that the order might have been a problem as well. I believe, however, that the problem lies within the fact that GuiContextMenuCtrl objects (can) use two different profiles. I don't think useOwnProfile applies to the textprofile at all. I guess you might be better off creating your own profile for this purpose, maybe inheriting the one you wanted to use originally. Profile inheritance should be possible somehow, I just can't remember how to do it, sorry.
__________________
Reply With Quote
  #4  
Old 07-26-2012, 11:57 AM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by Crow View Post
Emera, I was thinking that the order might have been a problem as well. I believe, however, that the problem lies within the fact that GuiContextMenuCtrl objects (can) use two different profiles. I don't think useOwnProfile applies to the textprofile at all. I guess you might be better off creating your own profile for this purpose, maybe inheriting the one you wanted to use originally. Profile inheritance should be possible somehow, I just can't remember how to do it, sorry.
Pretty sure you can do...

textprofile.profile = "nameofprofile";
textprofile.useOwnProfile = true;
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #5  
Old 07-26-2012, 12:12 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by xXziroXx View Post
Pretty sure you can do...

textprofile.profile = "nameofprofile";
textprofile.useOwnProfile = true;
I never knew you could use useownprofile for specific profiles like that. That's neato.
__________________
Reply With Quote
  #6  
Old 07-26-2012, 12:24 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by xXziroXx View Post
Pretty sure you can do...

textprofile.profile = "nameofprofile";
textprofile.useOwnProfile = true;
As far as I know, useOwnProfile is not a GuiControlProfile variable. So that probably won't work. Worth a shot though.
__________________
Reply With Quote
  #7  
Old 07-26-2012, 02:54 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
OP's problem with useOwnProfile taking over the defaults is indeed caused by the ordering of useOwnProfile.

Quote:
Originally Posted by Crow View Post
I don't think useOwnProfile applies to the textprofile at all. I guess you might be better off creating your own profile for this purpose, maybe inheriting the one you wanted to use originally. Profile inheritance should be possible somehow, I just can't remember how to do it, sorry.
You could probably do something like... (edit: tested, this does work)

PHP Code:
textprofile = new GuiBlueTextListProfile();
textprofile.fontColor = {25500}; 
or just make your own profile the normal way (you can do new GuiBlueTextListProfile("MyProfile") instead of new GuiControlProfile("MyProfile") for inheritence).

Quote:
Originally Posted by xXziroXx View Post
Pretty sure you can do...

textprofile.profile = "nameofprofile";
textprofile.useOwnProfile = true;
Please don't put profile names in quotes. They're objects, not strings. useOwnProfile is a property of a GUI control, not of a profile (that wouldn't make sense since profiles are shared, hence why unique ones are necessary to make changes for a certain object).

textprofile and scrollprofile are the profile objects the control is using.

PHP Code:
profile GuiBlueContextMenuProfile;
textprofile GuiBlueTextListProfile;
scrollprofile GuiBlueScrollProfile
Quote:
Originally Posted by Emera View Post
I never knew you could use useownprofile for specific profiles like that.
You can't.
__________________
Reply With Quote
  #8  
Old 07-26-2012, 09:14 PM
devilsknite1 devilsknite1 is offline
C:
devilsknite1's Avatar
Join Date: Jul 2006
Location: Florida, USA
Posts: 269
devilsknite1 has a spectacular aura about
Send a message via AIM to devilsknite1 Send a message via MSN to devilsknite1 Send a message via Yahoo to devilsknite1
Quote:
Originally Posted by cbk1994 View Post
You could probably do something like... (edit: tested, this does work)

PHP Code:
textprofile = new GuiBlueTextListProfile();
textprofile.fontColor = {25500}; 
Worked great, thanks.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:54 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.