Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Bug Report
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 10-13-2008, 06:56 PM
doomboy00 doomboy00 is offline
Registered User
doomboy00's Avatar
Join Date: Jan 2004
Posts: 45
doomboy00 is on a distinguished road
GuiDrawingPanel with mac client

It seems that the mac client can't view the image within a GuiDrawingPanel if the width or height has been set to above 1024.
This doesn't seem to be the case on the windows client with it being able to view way above 1024.

If anybody wants to test this, try the below code and it should work on both OS's, then change the width or height of the GuiDrawingPanel to 1025 and see that it doesn't view the image on the mac client.

NPC Code:

//#CLIENTSIDE
function onWeaponFired(){
new GuiScrollCtrl("Tiles_ScrollCtrl") {
profile = GuiBlueScrollProfile;
x = GUIContainer.width - 195;
y = GUIContainer.height - 195;
width = 195;
height = 165;
hScrollBar = vScrollBar = "dynamic";

new GuiDrawingPanel("Tiles_DrawingPanel") {
x = y = 0;
width = 1024;
height = 512;
drawimage(0,0,"TILES");
}
}
}



Can this be fixed or will I need to implement some code to handle this and stick to 1024, when a tileset should be 2048?
Reply With Quote
  #2  
Old 10-14-2008, 11:23 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
The size depends on the maximum texture size of the OpenGL driver. In the scripted level editor we made it so that we display a drawing panel on top of the scroll control and are updating the drawing panel when the scroll control is scrolled:
- add a fake GuiControl into the scroll control with the size of 2048x512 so that you can scroll the scroll bar
- handle the event MyScroll.onScrolled(scrollx,scrolly,deltax,deltay)
Reply With Quote
  #3  
Old 10-14-2008, 04:07 PM
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
Quote:
Originally Posted by Stefan View Post
In the scripted level editor
Where is this level editor?
__________________
Reply With Quote
  #4  
Old 10-14-2008, 10:30 PM
doomboy00 doomboy00 is offline
Registered User
doomboy00's Avatar
Join Date: Jan 2004
Posts: 45
doomboy00 is on a distinguished road
Thanks

Thanks, I just wanted to know why it happened on the mac client, but okay.

Yeah, I did it slightly differently without the use of the fake gui control, I just left the Drawing Panel within the scroll control at 1024x512 and used the onScroll function as you suggested like so:

NPC Code:

function Tiles_ScrollCtrl.onScrolled(nx,ny,dx,dy){
Tiles_DrawingPanel.drawimagerectangle(0,0,"TILES", temp.nx + Tiles_ScrollCtrl.width - 4,temp.ny,2048,Tiles_DrawingPanel.height);
}



and that works fine.

Thanks for the reponse
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 02:40 AM.


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