2 registered members (AndrewAMD, 7th_zorro),
1,285
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: LBGUI - RELEASE
[Re: Lukas]
#419866
03/15/13 20:06
03/15/13 20:06
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
Senior Member
|
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
|
Malice
Unregistered
|
Malice
Unregistered
|
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.
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
82RJZAE
Member
|
Member
Joined: Jul 2008
Posts: 168
|
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?
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
|
Malice
Unregistered
|
Malice
Unregistered
|
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.
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
82RJZAE
Member
|
Member
Joined: Jul 2008
Posts: 168
|
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
|
Malice
Unregistered
|
Malice
Unregistered
|
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: 82RJZAE]
#423331
05/27/13 23:24
05/27/13 23:24
|
Malice
Unregistered
|
Malice
Unregistered
|
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. EDIT* I said lbgui_elements megatype struct (wow confusing). How about just thinking of a lbg_composite struct. 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.
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
82RJZAE
Member
|
Member
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.
|
|
|
|