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 05-21-2009, 06:20 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
GuiWindowProfile- problems

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?
Attached Thumbnails
Click image for larger version

Name:	gui_Test.png
Views:	188
Size:	26.4 KB
ID:	48491  
Reply With Quote
  #2  
Old 05-21-2009, 06:25 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
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.
Reply With Quote
  #3  
Old 05-21-2009, 06:27 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
Quote:
Originally Posted by Crow View Post
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
Reply With Quote
  #4  
Old 05-21-2009, 06:38 PM
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
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";
  }

__________________
Quote:
Reply With Quote
  #5  
Old 05-21-2009, 06:48 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
Weird, but it's worked. Thanks!

HTML Code:
  new GuiWindowProfile("Profiletest) {
    with(profile) {
      bitmap = "gui_mainprofile-back.png";
      transparency = true;
      opaque = true;
    }
  }
Reply With Quote
  #6  
Old 05-21-2009, 06:53 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
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.
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 11:58 PM.


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