Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by AndrewAMD. 12/05/23 10:56
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (3run, AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip), 605 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Panel vergrössern bzw. verkleinern [Re: Icke] #339517
08/27/10 11:14
08/27/10 11:14
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Das Skalieren und Drehen von Panels ist ein relativ "junges" Feature, deshalb und weiles nicht erwähnt ist, musst Du davon ausgehen, dass es das nicht für die buttons und digits gibt.
"Text" ist allerdings skalierbar, dann müsstest Du das aber insgesamt anders aufziehen.
Bei den Buttons könntest Du es eventuell durch das Austauschen der jeweiligen Bitmaps herstellen.

Eine generelle Skalierbarkeit der Elemente eines panels mit dem Panel zusammen könnte man mal im Future-Forum vorschlagen.

Re: Panel vergrössern bzw. verkleinern [Re: Pappenheimer] #339528
08/27/10 13:44
08/27/10 13:44
Joined: Sep 2009
Posts: 496
P
Progger Offline
Senior Member
Progger  Offline
Senior Member
P

Joined: Sep 2009
Posts: 496
Here is a code i wrote myself that makes your picture when u create it in your screensize so that it matches to every screensize

Code:
var width; 
var height;

PANEL*mypan=
{
bmap="example.bmp";
flags=VISIBLE|SHOW;
}
function main()
{
level_load("");
while(1)
{
width=screen_size.x;
height=screen_size.y;

mypan.scale_x=1/(1440/width);//where the 1440 stands u must put ur screen_size.x;
mypan.scale_y=1/(900/height);//here u must put where the 900 is ur screensize.y;

wait(1);
}
}



So with this code u only have to make one bmap.

for the buttons u must make one Panel for each button.

then u could use
Code:
PANEL* button1=
{

button (0, 0, "example2.bmp", "example3.bmp", "example3.bmp", NULL, NULL, NULL);
	layer=2;
	flags=OVERLAY|SHOW;
}

function main()
{
level_load("");
while(1)
{
button1.pos_x = 500/(1440/width);
button1.pos_y = 300/(900/width);
button1.scale_x=1/(1440/width);
button1.scale_y=1/(900/height);
wait(1);
}
}



and combined it looks like this

Code:
var width; 
var height;

PANEL*mypan=
{
bmap="example.bmp";
flags=VISIBLE|SHOW;
}

PANEL* button1=
{

button (0, 0, "example2.bmp", "example3.bmp", "example3.bmp", NULL, NULL, NULL);
	layer=2;
	flags=OVERLAY|SHOW;
}

function main()
{
level_load("");
while(1)
{
width=screen_size.x;
height=screen_size.y;

mypan.scale_x=1/(1440/width);//where the 1440 stands u must put ur screen_size.x;
mypan.scale_y=1/(900/height);//here u must put where the 900 is ur screensize.y;
button1.pos_x = 500/(1440/width);
button1.pos_y = 300/(900/width);
wait(1);
}
}


But the script with the buttons make the buttons position so that it matches to the Panel not to the Engine position

WFG Progger laugh


Last edited by Progger; 08/27/10 14:00.

asking is the best Way to get help laugh laugh laugh
Re: Panel vergrössern bzw. verkleinern [Re: Icke] #339563
08/27/10 19:18
08/27/10 19:18
Joined: Feb 2006
Posts: 212
Germany
Icke Offline OP
Member
Icke  Offline OP
Member

Joined: Feb 2006
Posts: 212
Germany
habe das problem mit eine grösseren panel und einem höheren layer gelöst.
nicht unbedingt mein wunsch aber praktikabel.


PS.: es gibt immer mindestens 4 Lösungen
meine
deine
die richtige
und die die funktioniert

Page 2 of 2 1 2

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