Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Zoom adjusted by screensize (https://forums.graalonline.com/forums/showthread.php?t=134267502)

greggiles 12-05-2012 06:38 AM

Zoom adjusted by screensize
 
My goal: Have a constant view area around player no matter the size of the screen.

1st Attempt: I made an Img appear that's height and width was set determined by the screenwidth/screenheight.

Problem: couldn't see chat bar..and the black is ugly

2nd Attemp:
PHP Code:

function onTimeOut() {
 
setTimer(0.05);
 
this.controlWidth 600;
 
this.controlHeight 550;
 
with(GraalControl){
  
x=screenwidth/2;
  
y=screenheight/2;
  
width=thiso.controlWidth;
  
height=thiso.controlHeight;
 } 

Problem: It wouldn't center right, had to restart client before getting on another server to reset the black border, and once again, black is ugly... :cry:

Solution IDEASo I had this idea. A function that zooms everything determined on the screen size. Of what I heard There are some commands like camerabounds and camerasize but they are totally undocumented.

Thoughts?

DustyPorViva 12-05-2012 06:50 AM

v6 has canvas zooming but it's not great(a lot of visual bugs) so your options are pretty slim. What you can do is resize GraalControl and try adding ChatBar to GUIContainer, which should make it visible all the time. Then if the black is ugly try filling it with some graphics like the ol' Super Gameboy(since gameboy resolution didn't match the output resolution of the SNES):
http://media.giantbomb.com/uploads/0...3_00_super.gif

Be very careful tinkering around with default controls. I mean, you're not going to say... crash a client but they're not scripted with being tinkered in mind. You'll have to account for the various things that can throw it off and mess everything up, like a new GUI being added to GUIContainer or such and not being accounted for on your end.

greggiles 12-05-2012 07:24 AM

Quote:

v6 has canvas zooming but it's not great(a lot of visual bugs)
How do you set the canvas zooming?

greggiles 12-05-2012 07:52 PM

I found out player.zoomfactor does zoom in a way, but makes an ugly grid.
Soooo frustrated on find a working solution

DustyPorViva 12-05-2012 08:12 PM

Quote:

Originally Posted by greggiles (Post 1708628)
I found out player.zoomfactor does zoom in a way, but makes an ugly grid.

Well I told you it had a lot of visual glitches...

Gunderak 12-08-2012 06:58 AM

Couldn't you just stretch the GraalControl GUI?

cbk1994 12-08-2012 02:30 PM

Quote:

Originally Posted by Gunderak (Post 1708944)
Couldn't you just stretch the GraalControl GUI?

nope, weird things happen when you manipulate GraalControl's position, let alone any more complicated transformations.


All times are GMT +2. The time now is 11:26 PM.

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