Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   GuiWindowProfile- problems (https://forums.graalonline.com/forums/showthread.php?t=85654)

[email protected] 05-21-2009 06:20 PM

GuiWindowProfile- problems
 
1 Attachment(s)
Why hello there!
So, I'm creating a weapon full of profiles, so that it can be used many of times from one weapon. However, when using this

HTML Code:

  //In the Profile weapon
public function onLoadProfiles() {
  new GuiWindowProfile("Main") {
    with(profile) {
      bitmap = "gui_mainprofile-back.png";
    }
  }
}

  //In another NPC
function onLoad() { 
  Profiles.onLoadProfiles();
  new GuiWindowCtrl("Profiletest") {
    profile = Main;
   
    extent = {300, 300};
    position = {100, 100};
  }
}

Will show the image, but it's got an invisable middle part!
(Test 1 in the image below)


However, when using
HTML Code:

function onLoad() { 
  new GuiWindowCtrl("Profiletest") {
    useownprofile = true;
    with(profile) {
      bitmap = "gui_mainprofile-back.png";
    }

    extent = {300, 300};
    position = {100, 100};
  }
}

It'll show 'Test2' in the image below with the part coloured in... any ideas?

Crow 05-21-2009 06:25 PM

I suggest removing the public function. Just put the profiles straight into the wnpc and add it to the player. Maybe that will fix it.

[email protected] 05-21-2009 06:27 PM

Quote:

Originally Posted by Crow (Post 1492796)
I suggest removing the public function. Just put the profiles straight into the wnpc and add it to the player. Maybe that will fix it.

No fix- however you're right. Only need to call it once, thanks :D

fowlplay4 05-21-2009 06:38 PM

This worked for me.. hope it can help.

PHP Code:

function createProfiles() {
  new 
GuiControlProfile(ObscuredWindowProfile) {
    
bitmap "defaultwindowobs.png";
    
transparency 1;
    
opaque 1;
    
fontcolor "255 255 255";
    
fonttype "Arial";
    
fillcolor =  fillcolorhl fillcolorna "28 30 28";
  }



[email protected] 05-21-2009 06:48 PM

Weird, but it's worked. Thanks!

HTML Code:

  new GuiWindowProfile("Profiletest) {
    with(profile) {
      bitmap = "gui_mainprofile-back.png";
      transparency = true;
      opaque = true;
    }
  }


DustyPorViva 05-21-2009 06:53 PM

Transparency should be 1, actually(since it's on a scale from 0-1), the fact that true worked is just because true = 1 :P

But yes, the problem before was you were using an opaque image with default transparency as well(since Graal ONLY does this with the interior of the window). Setting the transparency to 1 will disable Graal from making the image transparency and allow the image to do all the work.

I believe though with opaque set to true, you don't even need to set the transparency since that disables it.


All times are GMT +2. The time now is 06:49 AM.

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