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 06-18-2008, 05:13 AM
bscharff bscharff is offline
Bloo
bscharff's Avatar
Join Date: Sep 2006
Location: San Antonio, Texas
Posts: 185
bscharff has a little shameless behaviour in the past
Send a message via AIM to bscharff Send a message via MSN to bscharff Send a message via Yahoo to bscharff
Color text in GuiTextCtrl?

PHP Code:
    new GuiTextCtrl("BNSS_Info3") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "Red = Alert";
      
width 75;
      
200;
      
195;
    } 
What would I do to change the text's color to red (or any other color)?

If this is not possible, please tell me what control I would need to use (or whine at Stefan to make it possible).
__________________
Trying to be nice now...
Reply With Quote
  #2  
Old 06-18-2008, 05:17 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
To turn the text red, you can just add red = 1; green = blue = 0; to the bottom of the control.
Just use it like you would for a light effect.
__________________

Reply With Quote
  #3  
Old 06-18-2008, 05:23 AM
bscharff bscharff is offline
Bloo
bscharff's Avatar
Join Date: Sep 2006
Location: San Antonio, Texas
Posts: 185
bscharff has a little shameless behaviour in the past
Send a message via AIM to bscharff Send a message via MSN to bscharff Send a message via Yahoo to bscharff
Such as

PHP Code:
    new GuiTextCtrl("BNSS_Info3") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "Red = Alert";
      
width 75;
      
200;
      
195;
red 1;
    } 
(ANSWER: YES)

NVM, got it!
__________________
Trying to be nice now...

Last edited by bscharff; 06-18-2008 at 05:34 AM..
Reply With Quote
  #4  
Old 06-18-2008, 12:23 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Hmm, you can also use GuiMLTextCtrl, and then use the <font> tag ;o (Plus then you can have more then one color)
__________________
Reply With Quote
  #5  
Old 06-18-2008, 02:17 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
The preferred method to change the color is to change the profile:

PHP Code:
new GuiBlueTextProfile("MyTextProfile") {
  
fontcolor = {255,0,0}; // for red
}

new 
GuiTextCtrl("MyTextCtrl") {
  
profile MyTextProfile;

Reply With Quote
  #6  
Old 06-18-2008, 09:47 PM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
Use this:

PHP Code:
new GuiTextCtrl("BNSS_Info3")
{
  
profile GuiBlueTextProfile;
  
profile.fontcolor = {255,0,0};
  
useOwnProfile true;
  
height 20;
  
text "Red = Alert";
  
width 75;
  
200;
  
195;
 } 
Reply With Quote
  #7  
Old 06-18-2008, 10:22 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
Quote:
Originally Posted by Stryke View Post
Use this:

PHP Code:
new GuiTextCtrl("BNSS_Info3")
{
  
profile GuiBlueTextProfile;
  
profile.fontcolor = {255,0,0};
  
useOwnProfile true;
  
height 20;
  
text "Red = Alert";
  
width 75;
  
200;
  
195;
 } 
You (need to) should define useownprofile before changing the profile ...
__________________
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:05 AM.


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