Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by M_D. 04/26/24 20:22
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (M_D, AndrewAMD, Quad, Ayumi), 806 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
load bmaps in a function? #360681
02/26/11 03:24
02/26/11 03:24
Joined: Sep 2010
Posts: 67
FutureRaptor Offline OP
Junior Member
FutureRaptor  Offline OP
Junior Member

Joined: Sep 2010
Posts: 67
Hello is there a a way to load bmaps (panels) in functions. Thanks!

Re: load bmaps in a function? [Re: FutureRaptor] #360682
02/26/11 04:06
02/26/11 04:06
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
set this in your function:

dt_splash_bmp = bmap_createblack(500,45,32);
bmap_fill (dt_splash_bmp,vector(0,0,0),70);
PANEL* my_pan = pan_create ("bmap = dt_splash_bmp; red = 255; green = 0; blue = 0", 102);

dt_splash_bmap: I have problems if i create this pointer inside the function, so i create it outside:

BMAP* dt_splash_bmap;

Maybee another can help here...

Last edited by Widi; 02/26/11 04:07.
Re: load bmaps in a function? [Re: Widi] #360743
02/26/11 18:00
02/26/11 18:00
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
You can create bmaps with bmap_create, and panels with pan_create. If you want to do both in one step you can use:

pan_create ("bmap = \"mybitmap.bmp\";",1337);


Always learn from history, to be sure you make the same mistakes again...
Re: load bmaps in a function? [Re: Uhrwerk] #360793
02/27/11 04:22
02/27/11 04:22
Joined: Sep 2010
Posts: 67
FutureRaptor Offline OP
Junior Member
FutureRaptor  Offline OP
Junior Member

Joined: Sep 2010
Posts: 67
thanks guys but how I can place the bmap (x,y only) using the function. Also I have to be able to change the layer in the function.

Re: load bmaps in a function? [Re: FutureRaptor] #360866
02/27/11 16:33
02/27/11 16:33
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Please be more specific. You can't place a bitmap at all. Placing a panel is simple by changing its pos_x and pos_y values. The layer can be changed by defining it in pan_create. See the manual for more information.


Always learn from history, to be sure you make the same mistakes again...
Re: load bmaps in a function? [Re: Uhrwerk] #360885
02/27/11 18:39
02/27/11 18:39
Joined: Sep 2010
Posts: 67
FutureRaptor Offline OP
Junior Member
FutureRaptor  Offline OP
Junior Member

Joined: Sep 2010
Posts: 67
I meant how to place the panel to a certain position because pos_x and pos_y don't work in functions.

Re: load bmaps in a function? [Re: FutureRaptor] #360890
02/27/11 18:52
02/27/11 18:52
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
hopfel Offline
User
hopfel  Offline
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
pos_x and pos_y work perfectly, if not you use it the false way, and for the layer: layer_sort(PANEL*, var layer)


Hilf mir, dir zu helfen!
Re: load bmaps in a function? [Re: hopfel] #360898
02/27/11 19:20
02/27/11 19:20
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
my_pan.pos_x = 500;

Why that don`t work in a function? Works perfectly.

Last edited by Widi; 02/27/11 19:21.

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