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 09-09-2007, 11:55 PM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
Gui problem, help please

I'm new to the GuiCtrl functions and i am having a big problem.
PHP Code:
//#CLIENTSIDE
function onCreated(){
stats();
new 
GuiShowImgCtrl("Main_Gui") {
   
2;
   
0;
   
width 226;
   
height 91;
   
image ="metric_gui1.png";
   }
new 
GuiShowImgCtrl("Hotkey_Gui") {
   
2;
   
489;
   
width 365;
   
height 43;
   
image ="metric_gui1.png";
 }
}
function 
stats()
{
showstats(0x400 0x800);

Main_Gui works but Hotkey_Gui doesn't. I've been trying to find a function that will let me put the x and y of the image so that it will show the right part of the image.
Attached Thumbnails
Click image for larger version

Name:	metric_gui1.png
Views:	149
Size:	3.2 KB
ID:	42756  
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #2  
Old 09-10-2007, 01:45 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Fixed over AIM.
__________________
Reply With Quote
  #3  
Old 09-10-2007, 04:41 AM
ShardIceFire ShardIceFire is offline
Dancing Pony Privateer
Join Date: Sep 2007
Location: The Desert
Posts: 31
ShardIceFire is on a distinguished road
Send a message via AIM to ShardIceFire
Quote:
Originally Posted by Inverness View Post
Fixed over AIM.
Could you explain to us what was incorrect about it, for the greater good?
__________________
Reply With Quote
  #4  
Old 09-10-2007, 05:46 AM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
instead of using x and y, you use
position = {x,y};
and instead of width and height use
extent = {w,h};
and when you add another GuiShowImg you should use
offsetx = x; (of the image)
offsety = y;
^ is the same as offsetx just its the y. And it is a negative!
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #5  
Old 09-10-2007, 06:32 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Well for the extent and position thing, thats just the recommended thing. x, y, width, and height still work but they're really just reflections of extent and position.

offsetx and offsety are the x and y of the image inside the GUI Control relative to the GUI control itself. So having an offsetx of -32 means the Image inside the GUI Control with be moved 32 pixels to the left of the GUI Control. Only the part of the image inside the GUI Control area actually shows.
__________________
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 01:51 AM.


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