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 01-19-2012, 06:34 AM
khortez khortez is offline
PrototypeX
khortez's Avatar
Join Date: Dec 2008
Posts: 91
khortez will become famous soon enough
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";
  }

Reply With Quote
  #2  
Old 01-19-2012, 07:11 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
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.
Attached Images
 
Attached Files
File Type: zip levels3d.zip (127.4 KB, 143 views)
__________________
Quote:
Reply With Quote
  #3  
Old 01-19-2012, 07:22 AM
khortez khortez is offline
PrototypeX
khortez's Avatar
Join Date: Dec 2008
Posts: 91
khortez will become famous soon enough
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?
Reply With Quote
  #4  
Old 01-19-2012, 07:38 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by khortez View Post
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.
__________________
Quote:
Reply With Quote
  #5  
Old 01-19-2012, 07:41 AM
khortez khortez is offline
PrototypeX
khortez's Avatar
Join Date: Dec 2008
Posts: 91
khortez will become famous soon enough
Quote:
Originally Posted by fowlplay4 View Post
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
Reply With Quote
  #6  
Old 01-19-2012, 07:54 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by khortez View Post
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
__________________
Quote:
Reply With Quote
  #7  
Old 01-19-2012, 07:57 AM
khortez khortez is offline
PrototypeX
khortez's Avatar
Join Date: Dec 2008
Posts: 91
khortez will become famous soon enough
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
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 01:01 AM.


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