Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-20-2006, 03:03 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
addRow&GuiTextListCtrl

Hi,

well I'm creating a GuiTextListCtrl in a GuiWindowCtrl
then im creating rows with
NPC Code:

with(addRow(id,string)){
profile="GuiTextListEntryProfile";
useownprofile=true;
profile.fontcolor="255,0,0";
}


worked just fine now i only want some rows to be in color, i tried something like a switch
NPC Code:

if(condition)
profile.fontcolor="0,255,0";
else
profile.fontcolor="255,0,0";


didnt work, it was green and then went red after a sec...
i tried adding 2 rows with addRow with different profile.fontcolors, seems like it always takes over the last set color for all rows, so how do i only color specific rows?
Reply With Quote
  #2  
Old 06-20-2006, 04:23 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
I'm not sure if you can individually color rows, would be an interesting feature to add though.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #3  
Old 06-23-2006, 06:50 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
Also the format is not "r,g,b" its "R G B" ie:
NPC Code:

profile.fontcolor = "0 255 0";



that is the format for colors in GS2 GUI's... also I am not 100% sure but I know with GuiMLText you have to do somethign like <color:rrggbb> and everything after that is a certain color (cant do </color> btw)
Reply With Quote
  #4  
Old 06-23-2006, 08:23 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Warcaptain
Also the format is not "r,g,b" its "R G B" ie:
NPC Code:

profile.fontcolor = "0 255 0";



that is the format for colors in GS2 GUI's... also I am not 100% sure but I know with GuiMLText you have to do somethign like <color:rrggbb> and everything after that is a certain color (cant do </color> btw)
Both work. You can also do profile.fontcolor = { R, G, B }; if you wanted to.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #5  
Old 06-23-2006, 11:00 AM
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 text list entries don't have profiles. You can set the color of the selected row etc. via the GuiTextListCtrl profile
Reply With Quote
  #6  
Old 06-23-2006, 01:16 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
yeah but i dont want to set the color of the selected row
i want to e.g.
color row 1 red
color row 2 blue
color row 3 yellow
color row 4 purpel
...
Reply With Quote
  #7  
Old 06-24-2006, 07:40 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by projectigi
yeah but i dont want to set the color of the selected row
i want to e.g.
color row 1 red
color row 2 blue
color row 3 yellow
color row 4 purpel
...
If they don't have profiles, it's not possible to do that. Unless they are parsing HTML in their text, then you could use HTML tags to change the color.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #8  
Old 06-30-2006, 01:19 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
bah i definitely hate it that we can't modify the gui objects..
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 10:45 PM.


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