Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Bug Report (https://forums.graalonline.com/forums/forumdisplay.php?f=193)
-   -   GuiDrawingPanel with mac client (https://forums.graalonline.com/forums/showthread.php?t=82321)

doomboy00 10-13-2008 06:56 PM

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?

Admins 10-14-2008 11:23 AM

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)

cbk1994 10-14-2008 04:07 PM

Quote:

Originally Posted by Stefan (Post 1432935)
In the scripted level editor

Where is this level editor? :confused:

doomboy00 10-14-2008 10:30 PM

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


All times are GMT +2. The time now is 04:55 AM.

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