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 02-06-2012, 02:18 AM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Drawing a head image in a text list

Ok, so here's what I'm doing. I'm gathering data from a database NPC that has certain heads listed in it via a triggerserver. I'm then sending the data back to the client and then adding the data to the text list control and setting the icon image as the head names that have been send back. It's all working well, although the heads are facing the wrong way.

I know that you can use partx,party,partw,parth to tweak this to make the heads face the right way, but I don't know how to apply it, or where to apply it under these circumstances. Can somebody help me out?

Database Data
HTML Code:
heads=head.png,head1.png,head2.png,head3.png
Adding the data to gui control

PHP Code:
function onActionClientside() {
  switch(
params[0]) {
    case 
"gotdetail":
      for(
temp.det params[1]) {
        
with(LD_TextList1.addrow(0,det)) {
          
icon.drawimagestretched(0,0,icon.width,icon.height,det,0,0,32,32);
        }
      }
    break;
  }

__________________
Reply With Quote
  #2  
Old 02-06-2012, 02:37 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
GuiDrawingPanel.drawimagerectangle(int, int, str, int, int, int, int) - destination x and y, source image, source x,y,width and height

icon.drawimagerectangle(0, 0, head_img, 0, 32 * 2, 32, 32);
__________________
Quote:
Reply With Quote
  #3  
Old 02-06-2012, 02:38 AM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by fowlplay4 View Post
GuiDrawingPanel.drawimagerectangle(int, int, str, int, int, int, int) - destination x and y, source image, source x,y,width and height
lul. Thanks for that.
__________________
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:40 AM.


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