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 01-24-2012, 06:42 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
showimg on top of gui window

Is there a way to put my images using showimg on top of the gui window? It keeps putting the gui first, which I know is what it's supposed to do. I just don't feel like rescripting these items to be guiimages, and would really prefer to keep them like they are if there is a fix to this. I tried putting layer values in the gui windows and showimages, but that didn't work.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #2  
Old 01-24-2012, 08:47 AM
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
There's no way to achieve this, no. You can use GuiShowImgCtrl, though. A GUI Control which in its core is the same as a regular TShowImg object.
__________________
Reply With Quote
  #3  
Old 01-25-2012, 05:06 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
It's just changing image numbers to gui names for the most part right? I think I just answered myself in that question, but eh.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #4  
Old 01-25-2012, 05:18 AM
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
No, GUI's fight for focus(not only render focus but input focus as well, like keyboard). You'll have to adjust them to make sure that they're being rendered appropriately and that they're not stealing input.
Reply With Quote
  #5  
Old 01-25-2012, 05:52 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Any documentation on this? I've searched and never heard of it. :X
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #6  
Old 01-25-2012, 06:20 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Maybe I'm better off asking why this doesn't work. :/ using showimg showed this up behind the gui. search_list isn't empty for sure.
PHP Code:
  for(temp.this.selected_num2temp.this.selected_num2 91temp.++) {
    
//player.chat = search_list[temp.v];
    
if (search_list[temp.v] != null ) {
    
      
//showImg(200+temp.v, "armageddon-iconbox.gif", new_x_position + 3, new_y_position + 30);
      //findImg(200+temp.v).layer = 5;
      //findImg(200+temp.v).mode = 1;
      
("shadow"@temp.v) = new GuiShowImgCtrl();
      (
"shadow"@temp.v).image "armageddon_inventory-iconbox.gif";
      (
"shadow"@temp.v).new_x_position 3;
      (
"shadow"@temp.v).new_y_position 30;
      (
"shadow"@temp.v).layer 5;
      (
"shadow"@temp.v).mode 1;
      
      
//showImg(600+temp.v, search_list[temp.v].image, new_x_position + 4, new_y_position + 5);
      //findImg(600+temp.v).layer = 6;
      //findImg(600+temp.v).mode = 1;
      
("weapon"@temp.v) = new GuiShowImgCtrl();
      (
"weapon"@temp.v).image search_list[temp.v].image;
      (
"weapon"@temp.v).new_x_position 4;
      (
"weapon"@temp.v).new_y_position 5;
      (
"weapon"@temp.v).layer 6;
      (
"weapon"@temp.v).mode 1
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #7  
Old 01-25-2012, 06:56 AM
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
Maybe try something like this:

PHP Code:
new GuiShowImgCtrl("Arm_Inventory_IconBox_" temp.v) {
  
new_x_position 3;
  
new_y_position 30;
  
image "armageddon_inventory-iconbox.gif";
  
mode 1;
  new 
GuiShowImgCtrl("Arm_Inventory_IconBox_" temp."_Icon") {
    
image search_list[temp.v].image;
    
4// Since it's a child of 'IconBox' it's x/y will be relative.
    
5// It should also draw above the icon box as well.
    
mode 1;
  }

__________________
Quote:
Reply With Quote
  #8  
Old 01-25-2012, 02:37 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano can only hope to improve
Quote:
Originally Posted by sssssssssss View Post
Maybe I'm better off asking why this doesn't work. :/ using showimg showed this up behind the gui. search_list isn't empty for sure.
PHP Code:
  for(temp.this.selected_num2temp.this.selected_num2 91temp.++) {
    
//player.chat = search_list[temp.v];
    
if (search_list[temp.v] != null ) {
    
      
//showImg(200+temp.v, "armageddon-iconbox.gif", new_x_position + 3, new_y_position + 30);
      //findImg(200+temp.v).layer = 5;
      //findImg(200+temp.v).mode = 1;
      
("shadow"@temp.v) = new GuiShowImgCtrl();
      (
"shadow"@temp.v).image "armageddon_inventory-iconbox.gif";
      (
"shadow"@temp.v).new_x_position 3;
      (
"shadow"@temp.v).new_y_position 30;
      (
"shadow"@temp.v).layer 5;
      (
"shadow"@temp.v).mode 1;
      
      
//showImg(600+temp.v, search_list[temp.v].image, new_x_position + 4, new_y_position + 5);
      //findImg(600+temp.v).layer = 6;
      //findImg(600+temp.v).mode = 1;
      
("weapon"@temp.v) = new GuiShowImgCtrl();
      (
"weapon"@temp.v).image search_list[temp.v].image;
      (
"weapon"@temp.v).new_x_position 4;
      (
"weapon"@temp.v).new_y_position 5;
      (
"weapon"@temp.v).layer 6;
      (
"weapon"@temp.v).mode 1
Did you actually add those to a GUIControl or anything?
Reply With Quote
  #9  
Old 01-25-2012, 02:50 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
Quote:
Originally Posted by Pelikano View Post
Did you actually add those to a GUIControl or anything?
It's not like you have to.
__________________
Reply With Quote
  #10  
Old 01-25-2012, 06:47 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano can only hope to improve
Quote:
Originally Posted by Crow View Post
It's not like you have to.
Yes you do...

If you don't want it to be inside a GUI, just do

GraalControl.addcontrol(yourImage);

if you want it to be inside your GUI just use your GuiControl instead of the GraalControl
Reply With Quote
  #11  
Old 01-25-2012, 07:09 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
Quote:
Originally Posted by Pelikano View Post
Yes you do...

If you don't want it to be inside a GUI, just do

GraalControl.addcontrol(yourImage);

if you want it to be inside your GUI just use your GuiControl instead of the GraalControl
No you don't... if you don't nest them inside another GUI then they won't be a child of another GUI...
Reply With Quote
  #12  
Old 01-25-2012, 07:25 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano can only hope to improve
Quote:
Originally Posted by DustyPorViva View Post
No you don't... if you don't nest them inside another GUI then they won't be a child of another GUI...
Everything is a child of another GUI... even if it's just GraalControl...

The way he's doing it he will have to manually add it to the GraalControl using .addcontrol
Reply With Quote
  #13  
Old 01-25-2012, 07:37 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
Quote:
Originally Posted by Pelikano View Post
Everything is a child of another GUI... even if it's just GraalControl...

The way he's doing it he will have to manually add it to the GraalControl using .addcontrol
Controls are added to GraalControl by default. I'd be very grateful if you could just stop posting about things you apparently don't know jack about.
__________________
Reply With Quote
  #14  
Old 01-25-2012, 08:54 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano can only hope to improve
Quote:
Originally Posted by Crow View Post
Controls are added to GraalControl by default. I'd be very grateful if you could just stop posting about things you apparently don't know jack about.
Controls are only added to GraalControl by default if you do:

PHP Code:
  new GuiShowImgCtrl("SomeImg") {
    
50;
    
50;
    
width 71;
    
height 96;
    
image "era_sam_hiddencard.png";
    
visible true;
  } 
But, if you do it like the OP and create a GuiShowImgCtrl object first, then set it's attributes you have to add it to GraalControl manually:

PHP Code:
  temp.guiImage = new GuiShowImgCtrl("SomeImg");
  
guiImage.50;
  
guiImage.50;
  
guiImage.width 71;
  
guiImage.height 96;
  
guiImage.image "era_sam_hiddencard.png";
  
guiImage.visible true;
  
// Will not show! 
Test it yourself. I'd be very grateful if you'd stop being totally arrogant and obviously you are the one who has no idea in this case.
Reply With Quote
  #15  
Old 01-25-2012, 09:05 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
Quote:
Originally Posted by Pelikano View Post
Test it yourself.
I did in the past and I still have some code running somewhere where I do it just like the OP. It works either way and is added to GraalControl by default.
__________________
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 09:23 PM.


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