Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/01/26 16:40
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (DrissB, clint000), 5,237 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Panel in C++: how to create / display? [Re: pararealist] #204383
04/29/08 00:06
04/29/08 00:06
Joined: Dec 2003
Posts: 521
LazyDog Offline
User
LazyDog  Offline
User

Joined: Dec 2003
Posts: 521
 Originally Posted By: pararealist
Quote: yes you can use buttons and sliders in c++ and yes my code works perfectly in delphi.

No problem after converting your code to c++
but have you (tried) used digits ?
Digits just dont show up on the panel, buttons, sliders etc does.


why yes I have tried digits and they work in Delphi.
what this sample does it put 2 digits on a panel,
the 1st digit simply is a label "y POS". the 2nd digit is the actual
value for "y POS". I needed to use a place holder (time_fac) to actually
generate the panel and then replace it with the actual variable I wanted which
in this case is actually the y position of the panel.

 Code:
Panel2 := pan_create('bmap = targ1.pcx;pos_x = 150;pos_y = 70;
                     flags=visible;
                     digits=10,50,"y POS",*,0,null;
                     digits=50,50,4,*,16,time_fac;',_VAR(2));

// this will replace the digit in our create string with our variable
// defined in our Delphi program
digits_set(Panel2,_VAR(2),@Panel2.pos_y);



www.LazyDogSoftware.com
Delphi SDK Homepage

A7 Pro 780
Delphi 5 through 2010
Re: Panel in C++: how to create / display? [Re: LazyDog] #204480
04/29/08 15:11
04/29/08 15:11
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline
Senior Member
pararealist  Offline
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
This is what i am trying

 Code:
 
	// Load debug screen
	FONT* debugFont = font_create("dungeon#13biu");
	PANEL* pDebug = pan_create(
	"pos_x = 0; pos_y = 365;"
    "digits = 10,0,DEBUG: gsANIMATE - using Gamestudio > A%0.4f\n,debugFont,1,ev->version;"
	//
    "digits = 10,35, iMLBtnPressed %0.0f\n ,debugFont,1,iMLBtnPressed);"
    "digits = 10,50, iMMBtnPressed %0.0f\n ,debugFont,1,iMMBtnPressed);"
    "digits = 10,65, iMRBtnPressed %0.0f\n ,debugFont,1,iMRBtnPressed);"
	// test button
    "button=3,3,opttabon1.pcx,opttab1.pcx,opttabov1.pcx, Null,Null,Null;"
	//
	"flags |= VISIBLE;"
	,_VAR(1) );



the test button appears but nothing else.
will try "*" instead of my defined FONT


A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.
Re: Panel in C++: how to create / display? [Re: pararealist] #204567
04/29/08 23:51
04/29/08 23:51
Joined: Dec 2003
Posts: 521
LazyDog Offline
User
LazyDog  Offline
User

Joined: Dec 2003
Posts: 521
one thing I noticed is that your panel definition should be one single string,
if you look at my example you'll see the whole definition is inside one set of
quotes '.....' but you have more than one set of "..." "..." "..."


www.LazyDogSoftware.com
Delphi SDK Homepage

A7 Pro 780
Delphi 5 through 2010
Re: Panel in C++: how to create / display? [Re: LazyDog] #204612
04/30/08 07:46
04/30/08 07:46
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline
Senior Member
pararealist  Offline
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
ib c++ its the only way to have it on separate lines (for readability).
EDIT: when i break the lines without having each line in separate quotes
i get errors in compiler. (this nearly made me pull my hair out, (what little i have left) until i found a solution googling.

Tried it on one long line too, still the same.
test button diaplays ok, but digits dont(at least not yet)

This is beginning to be fun in Visual Studio C++ 2005.
I find one must search and try (with help) until one gets it working.

I am actually doing the same project twice
1: rendering into a windows window
and
2: just using acknex window with panels.
//
learning lots by doing it this way, And i dont get bored with the same problems.

Will continue trying.

Thanks a lot for reply and your help.

Last edited by pararealist; 04/30/08 07:52.

A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.
Re: Panel in C++: how to create / display? [Re: pararealist] #209752
06/05/08 13:56
06/05/08 13:56
Joined: Mar 2006
Posts: 15
Kansas, USA
Q
quantum69 Offline
Newbie
quantum69  Offline
Newbie
Q

Joined: Mar 2006
Posts: 15
Kansas, USA
If you're still working on this, the way to have one long string broken across lines is using the backslash as the line-continuation character

Code:
	FONT* sfonta = font_create("Arial#14");
	PANEL* pSplash = pan_create("bmap = blitz.pcx; \
	                             pos_x = 10; \
	                             pos_y = 210; \
	                             digits(10,40,\"chub chub\",*,0,0); \
	                             digits(10,80,\"lost line\",sfonta,0,0); \
	                             ",_VAR(1));

As long as the cr/lf (the ENTER key) is pressed right AFTER the backslash, VS will interpret it as continuing the string on the next line. Any space after the backslash will gank it.

My problem with panels and the digits is that it won't display even fixed text (as in this example) if I don't use the default * (acknex) font. I know the definition is precisely what I see in the docs and what I've seen in these threads, but as soon as I try to use my own font, the text doesn't show up.

Any ideas?

Be good or be good at it, failing that, run like hell!
Quantum

ps
Don't forget to escape your embedded quotes ex. \"

Last edited by quantum69; 06/05/08 14:03.

------------------------------------
Quantum Mechanic
Better living at the subatomic level
Re: Panel in C++: how to create / display? [Re: quantum69] #209994
06/07/08 06:51
06/07/08 06:51
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline
Senior Member
pararealist  Offline
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
Quantum, thanks for the help with the
breaking of "........" over many lines.


A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.
Re: Panel in C++: how to create / display? [Re: quantum69] #209996
06/07/08 07:20
06/07/08 07:20
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline
Senior Member
pararealist  Offline
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
I have come to the conclusion that using panels in C++
is a terrible idea (at least for me).

My app is in Lite-C, but i am also doing it in C++ to
learn C++ and classes.
At the moment i am trying WIN32++ with A7. So far so Good.
//


A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.
Re: Panel in C++: how to create / display? [Re: pararealist] #210174
06/08/08 17:27
06/08/08 17:27
Joined: Mar 2007
Posts: 75
Hamburg, Ger
Altimeter Offline
Junior Member
Altimeter  Offline
Junior Member

Joined: Mar 2007
Posts: 75
Hamburg, Ger
same experience I made.
All my game is now transfered to C++, but PANELS are still (or again) programmed in Lite-C. It is simply easier and saves a lot of headaches and ugly workarounds.

Re: Panel in C++: how to create / display? [Re: Altimeter] #220729
08/08/08 23:22
08/08/08 23:22
Joined: Aug 2008
Posts: 2
M
metaldude Offline
Guest
metaldude  Offline
Guest
M

Joined: Aug 2008
Posts: 2
All my game is now transfered to C++, but PANELS are still (or again) programmed in Lite-C.

How do you mix between the two?

Re: Panel in C++: how to create / display? [Re: metaldude] #220795
08/09/08 15:53
08/09/08 15:53
Joined: Mar 2007
Posts: 75
Hamburg, Ger
Altimeter Offline
Junior Member
Altimeter  Offline
Junior Member

Joined: Mar 2007
Posts: 75
Hamburg, Ger
The main game is a short lite-c programm, which includes a panels.c file for definition of the panels. Then Lite C calls then my C++ game dll init function. An array of PANEL* is handed over from lite-c to the dll. From there on the C++ dll can access all panel flags, strings etc.

Page 2 of 3 1 2 3

Moderated by  TWO 

Gamestudio download | 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