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-29-2013, 06:28 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
GuiControl profile.fillcolor

So I was wondering how I would get a background in a GuiControl to fill a certain color. Right now what I am trying does not seem to work.

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
preview();
}

function 
preview() {
  (
"Window_test").Destroy();
  new 
GuiControl("Window_test") {
    
useownprofile true;
    
profile.border 1;
    
profile.fillcolor "50, 50, 50, 150";
    
screenwidth 162.5;
    
screenheight 150;
    
width 325;
    
height 100;
  }

Reply With Quote
  #2  
Old 06-29-2013, 06:38 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
I've not tested this, and I have no idea if this'll make a difference, but try moving the profile stuff under your positioning and sizing ****, and set the fill colour like this:

PHP Code:
profile.fillcolor = {505050150}; 
So...

PHP Code:
useownprofile true;

width 325;
height 100;
= (screenwidth 2) - 162.5;
= (screenheight 2) - 150;

profile.fillcolor = {505050150}; 
Reply With Quote
  #3  
Old 06-29-2013, 06:45 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
preview();
}

function 
preview() {
  (
"Window_test").Destroy();
  new 
GuiControl("Window_test") {
    
useownprofile true;
    
profile.border 1;
    
screenwidth 162.5;
    
screenheight 150;
    
width 325;
    
height 100;
    
profile.fillcolor = {505050150};
  }

Still didn't work. I tried various things but can't figure it out.
Reply With Quote
  #4  
Old 06-29-2013, 06:49 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 scriptless View Post
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
preview();
}

function 
preview() {
  (
"Window_test").Destroy();
  new 
GuiControl("Window_test") {
    
useownprofile true;
    
profile.border 1;
    
screenwidth 162.5;
    
screenheight 150;
    
width 325;
    
height 100;
    
profile.fillcolor = {505050150};
  }

Still didn't work. I tried various things but can't figure it out.
That's strange...
Reply With Quote
  #5  
Old 06-29-2013, 06:52 PM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
throw profile.opaque = true in there and that should make it work
Reply With Quote
  #6  
Old 06-29-2013, 06:53 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Thanks, it indeed works.
Reply With Quote
  #7  
Old 06-29-2013, 06:55 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 Cubical View Post
throw profile.opaque = true in there and that should make it work
You beat me to that then. I knew there was something obvious I was missing haha.
Reply With Quote
  #8  
Old 06-29-2013, 08:35 PM
Tim_Rocks Tim_Rocks is offline
a true gentlemen
Tim_Rocks's Avatar
Join Date: Aug 2008
Location: USA
Posts: 1,863
Tim_Rocks is a splendid one to beholdTim_Rocks is a splendid one to beholdTim_Rocks is a splendid one to beholdTim_Rocks is a splendid one to behold
Just wondering, I was messing with this the other day, is there a way to do rounded corners without using a bitmap profile.
__________________
Reply With Quote
  #9  
Old 06-29-2013, 09:26 PM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
The only way I can think of doing it is using a DrawingPanel as a container. I wouldn't do that personally though since the aren't efficient to redraw over and over.
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 03:32 PM.


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