Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, Aku_Aku, 1 invisible), 579 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Panel-scale #412234
11/24/12 15:00
11/24/12 15:00
Joined: Oct 2012
Posts: 22
Austria
W
WeTwoPlays Offline OP
Newbie
WeTwoPlays  Offline OP
Newbie
W

Joined: Oct 2012
Posts: 22
Austria
Wie kann ich ein Panel erzeugen, das das gesamte Fenster abdeckt?
Wenn ich die Bmap in einer Auflösung von 1280*720 habe? Es ist bei anderen immer rechts und unten ein Spalt frei.

Re: Panel-scale [Re: WeTwoPlays] #412236
11/24/12 15:05
11/24/12 15:05
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Du musst die pos_x, pos_y und die scale_x und scale_y member des Panels entsprechend mitskalieren.


Always learn from history, to be sure you make the same mistakes again...
Re: Panel-scale [Re: Uhrwerk] #412237
11/24/12 15:11
11/24/12 15:11
Joined: Oct 2012
Posts: 22
Austria
W
WeTwoPlays Offline OP
Newbie
WeTwoPlays  Offline OP
Newbie
W

Joined: Oct 2012
Posts: 22
Austria
also scale_x = screen_size_x, danke

Re: Panel-scale [Re: WeTwoPlays] #412238
11/24/12 15:17
11/24/12 15:17
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Das scheint mir etwas übertrieben... ^^

Aber mit panel.scale_x = screen_size.x / panel.size_x könntest Du es mal versuchen.


Always learn from history, to be sure you make the same mistakes again...
Re: Panel-scale [Re: Uhrwerk] #412242
11/24/12 15:33
11/24/12 15:33
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
ja, uhrwerk hat recht wink
scale_x und scale_y ist der skalierungsfaktor, nicht die zielgröße in pixeln.


POTATO-MAN saves the day! - Random
Re: Panel-scale [Re: Kartoffel] #412245
11/24/12 15:46
11/24/12 15:46
Joined: Nov 2011
Posts: 139
India
Yashas Offline
Member
Yashas  Offline
Member

Joined: Nov 2011
Posts: 139
India
Hi,
Code:
int x_pixels = screen_size.x;


This will hold the horizontal size of the PANEL you want.

Code:
int y_pixels = screen_size.y;


This will hold the vertical size of PANEL you want.

Code:
int scale_y_value = y_pixels / PANEL.size_y /* Current PANEL Size */;
int scale_x_value = x_pixels / PANEL.size_x /* Current PANEL Size */;



The formula to find how much you need to scale
= [WHAT SIZE YOU WANT] / [CURRENT SIZE]
This will give by what percentage the PANEL must be scaled to fit to your size.

This will stretch PANEL to cover the whole screen.
Code:
PANEL * pan =
{
    bmap = somebackground;
}
function main ()
{
    pan.scale_x = screen_size.x / pan.size_x;
    pan.scale_y = screen_size.y / pan.size_y;
    set(pan,SHOW);
}



Best of Luck laugh


Keep smiling laugh
http://translation.babylon.com/ - Translate many languages
Re: Panel-scale [Re: Yashas] #412247
11/24/12 16:24
11/24/12 16:24
Joined: Oct 2012
Posts: 22
Austria
W
WeTwoPlays Offline OP
Newbie
WeTwoPlays  Offline OP
Newbie
W

Joined: Oct 2012
Posts: 22
Austria
danke O.o

Re: Panel-scale [Re: WeTwoPlays] #412251
11/24/12 16:49
11/24/12 16:49
Joined: Nov 2011
Posts: 139
India
Yashas Offline
Member
Yashas  Offline
Member

Joined: Nov 2011
Posts: 139
India


Keep smiling laugh
http://translation.babylon.com/ - Translate many languages

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1