Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   GUI explanation needed please. (https://forums.graalonline.com/forums/showthread.php?t=134265589)

khortez 01-19-2012 06:34 AM

GUI explanation needed please.
 
Alright, to save time I'm just gonna post my code here. And explain my situation. So any questions on the script that you have just ask and i'll explain. with that said...

How do i make a custom profile with the graphics I want for my GUI? I have looked at the only site i know that holds an explanation on custom profiles, but i just cannot seem to grasp it. I've studied it for a very long time (A lot more then you may think).

I got no where else to look. So any errors (which i'm sure you will find many) and mistakes, please point them out, and lead me in the right direction. Thanks in advance for any helpful input:

PHP Code:

//#CLIENTSIDE
function onCreated() {
  new 
GuiControlProfile("Test") {
    
fillColor = {
      
25500
    
};
    
fontColor = {
      
255255255
    
};
    
bitmap "block.png";
    
opaque false;
    
transparency 0.5;
  }
  new 
GuiWindowCtrl("Test_Window") {
    
profile "Test";
    
10;
    
10;
    
width 160;
    
height 80;
    
text "Window";
  }



fowlplay4 01-19-2012 07:11 AM

2 Attachment(s)
Using the actual template and not 'block.png' works.

You're pretty much on the right track from there. If you want to do small one-time modifications you can use 'useownprofile'. I.e:

PHP Code:

//#CLIENTSIDE
function onCreated() {
  new 
GuiWindowCtrl("Test_Window") { 
    
profile GuiBlueWindowProfile;
    
useownprofile true;
    
profile.transparency 0.5;
    
10
    
10
    
width 160
    
height 80
    
text "Window"
  } 


Included the template and other files.

khortez 01-19-2012 07:22 AM

oh i think i get it, so if i was to use a custom made graphic for the GUI, i'd have to do it the same way i would create custom tiles for a tileset?

fowlplay4 01-19-2012 07:38 AM

Quote:

Originally Posted by khortez (Post 1682075)
oh i think i get it, so if i was to use a custom made graphic for the GUI, i'd have to do it the same way i would create custom tiles for a tileset?

You have to use the templates otherwise it won't work as you saw.

I don't really get what you're saying about creating custom tiles though.

khortez 01-19-2012 07:41 AM

Quote:

Originally Posted by fowlplay4 (Post 1682076)
You have to use the templates otherwise it won't work as you saw.

I don't really get what you're saying about creating custom tiles though.

From what i have seen so far, a person had to use classic tiles as a template to make their own set of tiles.

I just compared what you gave me to that was all. hope that clears what i meant up a little bit

fowlplay4 01-19-2012 07:54 AM

Quote:

Originally Posted by khortez (Post 1682078)
From what i have seen so far, a person had to use classic tiles as a template to make their own set of tiles.

I just compared what you gave me to that was all. hope that clears what i meant up a little bit

Gotcha, there's a minor difference though the template isn't set in stone and can be flexible to suit your GUIs needs to an extent. Here's another thread on it:
http://forums.graalonline.com/forums...hlight=profile

khortez 01-19-2012 07:57 AM

I'll use it the best i can thank you, i can't tell you how much that little bit of missing information was throwing me off


All times are GMT +2. The time now is 12:21 PM.

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