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 12-17-2007, 10:29 PM
Kyranki Kyranki is offline
Freelance Coder
Join Date: Aug 2007
Location: At the end of the rainbow, in the pot of gold.
Posts: 202
Kyranki is on a distinguished road
Send a message via AIM to Kyranki Send a message via MSN to Kyranki
GuiShowImgCtrls

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
this.signedin false;
  
makeControls();
}
public function 
makeControls() {
  new 
GuiShowImgCtrl(L_Background) {
    
image "galdor_background-login.png";
    
extent = {getImgWidth("galdor_background-login.png"), getImgHeight("galdor_background-login.png")};
    
position = {00};
    
visible true;
  }

I have never been good with using GuiShowImgCtrls and according to common script information this should work perfectly fine yet I see nada.
__________________
Stan.
Reply With Quote
  #2  
Old 12-17-2007, 10:40 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
You're using getImgWidth/getImgHeight. This is all well and all, but they will not give you the correct width/height until the image is loaded in the cache(after it downloads)... and since you're calling this onCreated, and not in a timeout loop, it most likely isn't updated. Also, try bitmap="image"; and see if that makes a difference. I doubt it though.
If you're still having problems, try deducing what could be causing the problem. Change the image to something you KNOW works, like head0.png. Also, put an echo in the function to make sure the function is calling.

Last edited by DustyPorViva; 12-17-2007 at 10:56 PM..
Reply With Quote
  #3  
Old 12-17-2007, 10:54 PM
Kyranki Kyranki is offline
Freelance Coder
Join Date: Aug 2007
Location: At the end of the rainbow, in the pot of gold.
Posts: 202
Kyranki is on a distinguished road
Send a message via AIM to Kyranki Send a message via MSN to Kyranki
Dusty, I tried head0.png like you suggested that worked perfectly fine however the image did not show even within a timeout as you suggested. :O
__________________
Stan.
Reply With Quote
  #4  
Old 12-17-2007, 10:55 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 that means there's something wrong with the image itself.
Try doing a find on RC and seeing if it's downloadable. If it isn't move it to the correct folder(level/images) and try again.
Reply With Quote
  #5  
Old 12-17-2007, 10:56 PM
Kyranki Kyranki is offline
Freelance Coder
Join Date: Aug 2007
Location: At the end of the rainbow, in the pot of gold.
Posts: 202
Kyranki is on a distinguished road
Send a message via AIM to Kyranki Send a message via MSN to Kyranki
It's downloadable and all.
__________________
Stan.
Reply With Quote
  #6  
Old 12-17-2007, 10:57 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 the ctrl works fine when you use head0.png?

Also, for future reference:
extent = {getImgWidth(image), getImgHeight(image)};
Reply With Quote
  #7  
Old 12-18-2007, 03:56 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
It bugs me when people use position and extent

x, y, width, height FTW
__________________
Reply With Quote
  #8  
Old 12-18-2007, 04:32 AM
Kyranki Kyranki is offline
Freelance Coder
Join Date: Aug 2007
Location: At the end of the rainbow, in the pot of gold.
Posts: 202
Kyranki is on a distinguished road
Send a message via AIM to Kyranki Send a message via MSN to Kyranki
Problem was fixed either way thanks guys.
__________________
Stan.
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 06:20 PM.


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