Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Gui Profile Problem (https://forums.graalonline.com/forums/showthread.php?t=134257614)

Immolate 01-10-2010 10:43 PM

Gui Profile Problem
 
1 Attachment(s)
I'm having trouble creating customised gui styles. I can't see anything I'm doing wrong:

PHP 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.

Fulg0reSama 01-10-2010 10:53 PM

That's some basic ass **** of a GUI right there. Good luck

Immolate 01-10-2010 10:56 PM

Quote:

Originally Posted by Fulg0reSama (Post 1549517)
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?

DustyPorViva 01-10-2010 11:10 PM

Need some specifics in what's going wrong? Are there syntax errors? Are the graphics messing up? Can you post some screenshots?

Immolate 01-10-2010 11:12 PM

Quote:

Originally Posted by DustyPorViva (Post 1549524)
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.

Fulg0reSama 01-10-2010 11:17 PM

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.

Immolate 01-10-2010 11:28 PM

Quote:

Originally Posted by Fulg0reSama (Post 1549530)
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.

DustyPorViva 01-10-2010 11:32 PM

So is it echoing test?
Try this:
PHP 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.

Immolate 01-10-2010 11:35 PM

Quote:

Originally Posted by DustyPorViva (Post 1549536)
So is it echoing test?
Try this:
PHP 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.

DustyPorViva 01-10-2010 11:38 PM

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.

Fulg0reSama 01-11-2010 12:06 AM

So my guess was correct? YES.

coreys 01-11-2010 12:43 AM

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.

Admins 01-11-2010 03:18 AM

May be try to remove the last line (1 pixel window background?) although the image looks fine to me.

Liberated 01-11-2010 08:54 AM

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.

Immolate 01-12-2010 09:09 PM

Quote:

Originally Posted by DustyPorViva (Post 1549536)
So is it echoing test?
Try this:
PHP 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 :)


All times are GMT +2. The time now is 08:36 PM.

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