Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
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
1 registered members (SBGuy), 652 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 13 of 17 1 2 11 12 13 14 15 16 17
Re: LBGUI - RELEASE [Re: NeoNeper] #419862
03/15/13 17:15
03/15/13 17:15
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline OP

Programmer
Lukas  Offline OP

Programmer

Joined: May 2007
Posts: 2,043
Germany
Hi, sorry for the delay of my answer.

I checked and it is in fact a bug that listitems won't turn invisible when their LIF_SHOW flag isn't set. I put it on my ToDo list. For now, as a workaround, in addition to turning off the LIF_SHOW flag, manually turn its panel and text invisible.

Re: LBGUI - RELEASE [Re: Lukas] #419866
03/15/13 20:06
03/15/13 20:06
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline
Senior Member
NeoNeper  Offline
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
makes sense! Tanks Lukas.


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: LBGUI - RELEASE [Re: Lukas] #423241
05/26/13 05:47
05/26/13 05:47

M
Malice
Unregistered
Malice
Unregistered
M



Hi I think a simple check in the function LBG_resize_window for 'NULL = no change' would help save typing. I haven't looked but anywhere this can be used would be helpful.
e.g.
Code:
LBG_resize_window(some_win,NULL,some_win->size_y/2);


Last edited by Malice; 05/26/13 05:49.
Re: LBGUI - RELEASE [Re: Lukas] #423264
05/27/13 08:29
05/27/13 08:29
Joined: Jul 2008
Posts: 168
8
82RJZAE Offline
Member
82RJZAE  Offline
Member
8

Joined: Jul 2008
Posts: 168
Originally Posted By: Lukas
it's a known bug that windows don't react on changing their WF_SHOW flag. As a workaround, you have to make its panels and children manually invisible. This will be fixed in the update I hope to release this year.
How do I properly hide each element? I tried resetting the SHOW flag and WF_SHOW but neither work to make the window invisible.

EDIT: And how can I check if the Enter key was pressed inside an EditBox like with inkey?
Code:
var r = inkey(input_string);
if(r==13){ // enter key was pressed
... // handle the string now
}


EDIT2: Just found in the manual --> void Key() should do the trick!

Last edited by 82RJZAE; 05/27/13 20:13.
Re: LBGUI - RELEASE [Re: 82RJZAE] #423313
05/27/13 20:06
05/27/13 20:06

M
Malice
Unregistered
Malice
Unregistered
M



Quote:
How do I properly hide each element? I tried resetting the SHOW flag and WF_SHOW but neither work to make the window invisible.


For the parent window win->panel->flags &=~SHOW; As for the children. I think it was something about going through link-list to see if thier 'parent' is that window and the respectively resetting the acknex panel 'show' flag for their 'panel' like elements.

I'd show you code but I haven't tried it yet as I haven't had a need.

Code:
win->panel->flags &=~SHOW;
reset(win->panel,SHOW);


Last edited by Malice; 05/27/13 20:15.
Re: LBGUI - RELEASE [Re: ] #423315
05/27/13 20:16
05/27/13 20:16
Joined: Jul 2008
Posts: 168
8
82RJZAE Offline
Member
82RJZAE  Offline
Member
8

Joined: Jul 2008
Posts: 168
Code:
LBG_WINDOW* a_window = 0;

void a_function(){
  a_window = LBG_create_window(0, 20, 160, 512, 256, 12, 1,"Window",&win_bbmaps,&win_cbmaps,&win_tbmaps,1, 0, WF_SHOW | WF_RESIZABLE);
}

void toggle_window()
{
	while(key_y)wait(1);
	if(is(a_window,SHOW)){
		a_window->flags &= ~SHOW;
	}
	else{
//		set(a_window,SHOW);
		a_window->flags |= SHOW;
	}
}

on_y = toggle_window;

It does not work when I set it with the above code.

Last edited by 82RJZAE; 05/27/13 20:18.
Re: LBGUI - RELEASE [Re: 82RJZAE] #423316
05/27/13 20:21
05/27/13 20:21

M
Malice
Unregistered
Malice
Unregistered
M



Code:
LBG_WINDOW* a_window = 0;

void a_function(){
  a_window = LBG_create_window(0, 20, 160, 512, 256, 12, 1,"Window",&win_bbmaps,&win_cbmaps,&win_tbmaps,1, 0, WF_SHOW | WF_RESIZABLE);
}

void toggle_window()
{
	while(key_y)wait(1);
	if(is(a_window->panel,SHOW)){
		a_window->panel->flags &= ~SHOW;
	}
	else{
//		set(a_window->panel,SHOW);
		a_window->panel->flags |= SHOW;
	}
}

on_y = toggle_window;




a_window is a lbgui object that holds the pointer to a real acknex panel object in the var panel[confusing] lbgui_window->panel->flags


@Lukas Maybe change that pointers name to ack_panel would help.

Last edited by Malice; 05/27/13 20:28.
Re: LBGUI - RELEASE [Re: ] #423317
05/27/13 20:24
05/27/13 20:24
Joined: Jul 2008
Posts: 168
8
82RJZAE Offline
Member
82RJZAE  Offline
Member
8

Joined: Jul 2008
Posts: 168
Ohhh I understand now! Thanks Malice! laugh

Re: LBGUI - RELEASE [Re: 82RJZAE] #423331
05/27/13 23:24
05/27/13 23:24

M
Malice
Unregistered
Malice
Unregistered
M



It is possible to modify thee LBG_destroy_window to instead hide the window and all it's children. Should I try and post the result?

I also would like to suggest flag e.g. WF_LOCK_INSIDE_PARENT so I can't move the child out of the parent.

Quote:
EDIT* I said lbgui_elements megatype struct (wow confusing). How about just thinking of a lbg_composite struct.


Quote:
OP* Lukas maybe this is a bad idea but could you have a lbgui_elements mega-type struct so that all elements create with a NULL parent get assign and then any element that is assign to a parent also stores it pointer in to lbugi_elements megatype struct.

Code:
typedef struct
{
	LBG_WINDOW* owner_obj;
	LBG_BUTTON* my_buts[100];
	LBG_WINDOW* my_wins[100];
	ect.
	ect.
}LBG_ELEMENTS;

#define LBG_MAX_ELEMENTS 500;
LBG_ELEMENTS* LBG_screen_elements[LBG_MAX_ELEMENTS];

void LBG_create_x(var parent,x,x,x)
{
	var 1;
	if(!parent)
	{
		for(i=0;i<LBG_MAX_ELEMENTS;i++)
		{
			if(i=LBG_MAX_ELEMENTS)
			{
				printf("LBG_MAX_ELEMENTS too small or full");
				break
			}
			if(!LBG_screen_elements[i])
			{
				LBG_screen_elements[i]->owner = me;
				break;
			}
		}
	}
	else
	{
		var j;
		// find the parents LBG_screen_elements struct
		for(i=0;i<LBG_MAX_ELEMENTS;i++)
		{
			if(LBG_screen_elements[i]->owner == parent)
			{
		        /* find an empity struct pointer in the right 
type based on create function 
type e.i. LBG_create_button pass 
LBG_screen_elements[i]->my_buts[j]*/
				for(j=0;j<LBG_MAX_ELEMENTS;j++)
				{
					if(!LBG_screen_elements[i]->my_buts[j])
					LBG_screen_elements[i]->my_buts[j] = my;
					break;
				}
				// hand over point.
			}
		}
		
	}
}



Then I could write a function the goes through the elements struct and set/reset(s) and panel->flags parameters.


Well I'm just a beginner and you may very well have something like this or else how could the destor() functions work.

Last edited by Malice; 05/28/13 01:13.
Re: LBGUI - RELEASE [Re: ] #423491
05/30/13 23:50
05/30/13 23:50
Joined: Jul 2008
Posts: 168
8
82RJZAE Offline
Member
82RJZAE  Offline
Member
8

Joined: Jul 2008
Posts: 168
Any idea how to get vertical scrollbars to work with LBG_create_text when the text string spans longer than or is positioned outside the window itself?

EDIT: What's the best way to approach having a large TEXT*'s string in a window with scrollbars? The entire string gets clipped once the topmost part of it is scrolled off the window.

Last edited by 82RJZAE; 05/31/13 06:15.
Page 13 of 17 1 2 11 12 13 14 15 16 17

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