problem with panels

Posted By: Saruniks

problem with panels - 07/26/09 14:45

hello all, I am new in this forum ant game creating.
I don't know if this is right section to write about problems and ask for help but...

I have problem with panels, I have few menu panels and when I start game they all open at once, they are all in one place so they don't seem.

so, if you could help me, I would like that when I start my main pannel would be the only one, if it is possible...
(maybe it's problem with layers or not, I don't know)
ps : I don't know if I need to post script here.
Posted By: Saruniks

Re: problem with panels - 07/26/09 15:08

fixed, I don't need help anymore


flags = VISIBLE was problem
Posted By: Claus_N

Re: problem with panels - 07/26/09 15:12

Hi, and welcome to the forum! smile
You could either post it here or in the scripting section, so it's fine wink

If all of the panels open at once, you have probably set "flags |= SHOW" in all of your panels.

Instead of doing that, you should show the main panel from function main.

Post your code if you want me to show you how to do it smile

Edit: Ah okay wink
Posted By: Saruniks

Re: problem with panels - 07/26/09 15:17

thanks, smile I will know I can post here smile
Posted By: alwaysblack

Re: problem with panels - 08/02/09 14:54

Actually, I have the same problem, so if you've got any pointers...
Posted By: Claus_N

Re: problem with panels - 08/02/09 14:58

@alwaysblack
What problem exactly? smile All panels showing up at game start?
Posted By: alwaysblack

Re: problem with panels - 08/02/09 16:06

My panel shows up OK, but I can't seem to set or reset the VISIBLE flag no matter what syntax I use. It compiles OK, but just doesn't change the flag.

Rather than embarass myself with this minor problem, maybe it's my overall strategy that's at fault. I'm trying to create a structure for my game, which is essentially 2D. I want to have a start menu screen, where the player can create a character and save and load it, and then a series of other screens that manage the character in play, a map screen, inventory screen etc.

My first guess was to create each screen as a set of panels that were controlled by a single variable that determined what 'screen' was supposed to be showing.

Do you think that sounds reasonable? Or am I barking up the wrong tree?
Posted By: Claus_N

Re: problem with panels - 08/02/09 16:16

The "visible" flag was renamed to "SHOW" in Lite-C for some reason, so you need to use SHOW instead wink

That sounds fine yeah smile there isn't just one way, or "the right way" of doing things - it depends on the programmers preference, and your solution does indeed sound reasonable smile

Programming is like art - every artist got its own style and habits.
Posted By: alwaysblack

Re: problem with panels - 08/02/09 17:34

Hmm, yes I've seen a few solutions that suggested that it was SHOW instead of VISIBLE, but I tried that and the compiler gave me the error that show wasn't understood. I'm not really sure about what defines which language is being used, is it the includes? <litec.h> and/or <defaultc.h> and/or <acknex.h>. The distinctions between C script, lite c, pure and legacy modes are lost on me at the moment.
Posted By: Claus_N

Re: problem with panels - 08/02/09 18:16

You should be using acknex.h when using gamestudio smile and often default.c is used as well, but isn't required - default.c should only be used when using acknex.h.

Just remember that Acknex is the name of the game engine, hence acknex.h should be used when you are programming a game using Gamestudio/Acknex.
© 2023 lite-C Forums