Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   GuiControl profile.fillcolor (https://forums.graalonline.com/forums/showthread.php?t=134268401)

scriptless 06-29-2013 06:28 PM

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;
  }



Emera 06-29-2013 06:38 PM

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}; 


scriptless 06-29-2013 06:45 PM

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.

Emera 06-29-2013 06:49 PM

Quote:

Originally Posted by scriptless (Post 1720051)
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...

Cubical 06-29-2013 06:52 PM

throw profile.opaque = true in there and that should make it work

scriptless 06-29-2013 06:53 PM

Thanks, it indeed works.

Emera 06-29-2013 06:55 PM

Quote:

Originally Posted by Cubical (Post 1720053)
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.

Tim_Rocks 06-29-2013 08:35 PM

Just wondering, I was messing with this the other day, is there a way to do rounded corners without using a bitmap profile.

Cubical 06-29-2013 09:26 PM

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.


All times are GMT +2. The time now is 07:00 AM.

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