Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-10-2010, 10:43 PM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
Gui Profile Problem

I'm having trouble creating customised gui styles. I can't see anything I'm doing wrong:

Graal Script Code:
//#CLIENTSIDE

function onCreated()
{
  
FinalStar_Test_Gui.destroy();
  
  new 
GuiWindowCtrl("FinalStar_Test_Gui")
  {
    
useownprofile true;
    
    
profile.bitmap "finalstar_gui.png";
    
    
width 200;
    
height 300;
    
    
canclose =
    
canmaximize =
    
canminimize =
    
canresize false;
    
    
text "Test";
  }
  
  echo(
"Test");

I've attached the image I'm using.
Attached Images
 
Reply With Quote
  #2  
Old 01-10-2010, 10:53 PM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
That's some basic ass **** of a GUI right there. Good luck
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
  #3  
Old 01-10-2010, 10:56 PM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
Quote:
Originally Posted by Fulg0reSama View Post
That's some basic ass **** of a GUI right there. Good luck
Does it have to be super complex to do what it needs to do?
Reply With Quote
  #4  
Old 01-10-2010, 11:10 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Need some specifics in what's going wrong? Are there syntax errors? Are the graphics messing up? Can you post some screenshots?
Reply With Quote
  #5  
Old 01-10-2010, 11:12 PM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
Quote:
Originally Posted by DustyPorViva View Post
Need some specifics in what's going wrong? Are there syntax errors? Are the graphics messing up? Can you post some screenshots?
There are no syntax errors.

Graphics are just not displaying what so ever.
Reply With Quote
  #6  
Old 01-10-2010, 11:17 PM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
No the GUI doesnt have to be super complex just thought id say it looks basic. I probably should of remembered to place my positive comment.

It looks neat.

And chances are whatever you did or used to trans the png file didn't do it right. Graal seems to be strict sometimes with pngs.
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
  #7  
Old 01-10-2010, 11:28 PM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
Quote:
Originally Posted by Fulg0reSama View Post
No the GUI doesnt have to be super complex just thought id say it looks basic. I probably should of remembered to place my positive comment.

It looks neat.

And chances are whatever you did or used to trans the png file didn't do it right. Graal seems to be strict sometimes with pngs.
I saved it exactly how I'd save every other graphic.
Reply With Quote
  #8  
Old 01-10-2010, 11:32 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
So is it echoing test?
Try this:
Graal Script Code:
//#CLIENTSIDE

function onCreated()
{
  
FinalStar_Test_Gui.destroy();
  
  new 
GuiWindowCtrl("FinalStar_Test_Gui")
  {
    
profile GuiBlueWindowProfile;
    
useownprofile true;
    
    
profile.bitmap "finalstar_gui.png";
    
    
10;
    
width 200;
    
height 300;
    
    
canclose =
    
canmaximize =
    
canminimize =
    
canresize false;
    
    
text "Test";
  }
  
  echo(
"Test");

It might help to assign an X and Y. I imagine it doesn't, but in this case it doesn't hurt to try. Also, I think useownprofile expects you to actually provide all the data needed to create a successful profile. In your case, all you're providing is the bitmap, so the other data may not be provided. You assign a profile like GuiBlueWindowProfile, then you edit individual values that you want to change and the default profile fills in the rest.
Reply With Quote
  #9  
Old 01-10-2010, 11:35 PM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
Quote:
Originally Posted by DustyPorViva View Post
So is it echoing test?
Try this:
Graal Script Code:
//#CLIENTSIDE

function onCreated()
{
  
FinalStar_Test_Gui.destroy();
  
  new 
GuiWindowCtrl("FinalStar_Test_Gui")
  {
    
profile GuiBlueWindowProfile;
    
useownprofile true;
    
    
profile.bitmap "finalstar_gui.png";
    
    
10;
    
width 200;
    
height 300;
    
    
canclose =
    
canmaximize =
    
canminimize =
    
canresize false;
    
    
text "Test";
  }
  
  echo(
"Test");

It might help to assign an X and Y. I imagine it doesn't, but in this case it doesn't hurt to try. Also, I think useownprofile expects you to actually provide all the data needed to create a successful profile. In your case, all you're providing is the bitmap, so the other data may not be provided. You assign a profile like GuiBlueWindowProfile, then you edit individual values that you want to change and the default profile fills in the rest.
I used a different bitmap made by someone else and it worked perfectly.
Reply With Quote
  #10  
Old 01-10-2010, 11:38 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
The thing that worries me is if the image is messed up, usually it will show some really distorted gui image instead of nothing. I'm not entirely sure, though. Nothing looks wrong the image. However, you can try eliminating any red divisions that are larger than one pixel... I'm pretty sure it only needs 1px of red between the objects to determine a separate part of the gui, and it's really sensitive about that sort of thing.
Reply With Quote
  #11  
Old 01-11-2010, 12:06 AM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
So my guess was correct? YES.
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
  #12  
Old 01-11-2010, 12:43 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
The Gui system is very finicky. It needs a specific format of PNG or GIF. It also needs the exact shade of red between the image parts at the same exact places. I'm guessing you did something wrong in one of those areas.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #13  
Old 01-11-2010, 03:18 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
May be try to remove the last line (1 pixel window background?) although the image looks fine to me.
Reply With Quote
  #14  
Old 01-11-2010, 08:54 AM
Liberated Liberated is offline
not doing alot
Liberated's Avatar
Join Date: Feb 2008
Posts: 1,366
Liberated has a spectacular aura about
i'm having the same problem when i try to edit my guis, nothing pops up, or it is messed up, i guess it's the files as some other gui styles work fine with it.
__________________
Quote:
Originally Posted by Tigairius View Post
I promise when I get rich I'll send you an iPhone. I'll send everyone an iPhone.
Reply With Quote
  #15  
Old 01-12-2010, 09:09 PM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
Quote:
Originally Posted by DustyPorViva View Post
So is it echoing test?
Try this:
Graal Script Code:
//#CLIENTSIDE

function onCreated()
{
  
FinalStar_Test_Gui.destroy();
  
  new 
GuiWindowCtrl("FinalStar_Test_Gui")
  {
    
profile GuiBlueWindowProfile;
    
useownprofile true;
    
    
profile.bitmap "finalstar_gui.png";
    
    
10;
    
width 200;
    
height 300;
    
    
canclose =
    
canmaximize =
    
canminimize =
    
canresize false;
    
    
text "Test";
  }
  
  echo(
"Test");

It might help to assign an X and Y. I imagine it doesn't, but in this case it doesn't hurt to try. Also, I think useownprofile expects you to actually provide all the data needed to create a successful profile. In your case, all you're providing is the bitmap, so the other data may not be provided. You assign a profile like GuiBlueWindowProfile, then you edit individual values that you want to change and the default profile fills in the rest.
This example and solution actually worked. Thanks man
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 06:38 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.