Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Drawing a head image in a text list (https://forums.graalonline.com/forums/showthread.php?t=134265707)

Emera 02-06-2012 02:18 AM

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;
  }



fowlplay4 02-06-2012 02:37 AM

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);

Emera 02-06-2012 02:38 AM

Quote:

Originally Posted by fowlplay4 (Post 1683757)
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.


All times are GMT +2. The time now is 07:45 AM.

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