2 registered members (firecrest, AndrewAMD),
387
guests, and 3
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
LBGUI - RELEASE
#335111
07/26/10 19:58
07/26/10 19:58
|
Joined: May 2007
Posts: 2,043 Germany
Lukas
OP
Programmer
|
OP
Programmer
Joined: May 2007
Posts: 2,043
Germany
|
This is LBGUI, a Lite-C header for creating GUI elements, such as: - Buttons (better ones than you already have)
- Windows
- Checkboxes and Radiobuttons
- Infoboxes that appear when you keep the mouse calm over something
- Progress bars
- Sliders (better ones than you already have)
- Listboxes
- Scrollbars for windows and listboxes
- Rightclick menus
- Comboboxes
- Digits (that work like "normal" digits but use use "real" TEXTs)
- Editboxes, which are 1024x better than inkey()
You will also be able to put "normal" panels and texts on a window. It's going to be my entry for the contest. It's going to be Open Source (as it's a Lite-C header), but I won't make it available before the deadline of the contest. Here's the demo (~2.41MB): http://www.brogames.de/LBGUI/LBGUI_demo_20100726.zipHere's the header: http://www.brogames.de/LBGUI/LBGUI.ziphttp://www.opserver.de/coni_users/web_users/pirvu/au/demo/zips/lbgui.zip
|
|
|
Re: LBGUI - Demo
[Re: Widi]
#335129
07/26/10 20:55
07/26/10 20:55
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
Just a question (haven't looked into the sourcecode), are your controls delegate based?
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: LBGUI - Demo
[Re: WretchedSid]
#335132
07/26/10 21:00
07/26/10 21:00
|
Joined: Nov 2002
Posts: 913 Berlin, Germany
SchokoKeks
User
|
User
Joined: Nov 2002
Posts: 913
Berlin, Germany
|
WOW! This is soooo useful. Too late to insert into my project unfortunately. It would be the perfect solution for menus if you could completely skin it, including freely changing the size of the elements (borders, bars, etc). If that will be possible (maybe it already is), you've got my vote
|
|
|
Re: LBGUI - Demo
[Re: SchokoKeks]
#335133
07/26/10 21:16
07/26/10 21:16
|
Joined: May 2007
Posts: 2,043 Germany
Lukas
OP
Programmer
|
OP
Programmer
Joined: May 2007
Posts: 2,043
Germany
|
@JustSid: I don't know exactly what "delegate based" you means, but the system works like this: You can create objects, which are stored in structs (the nearest to classes you can get in Lite-C...) with their specific create" function, and you can access their members like engine objects. The objects are "managed" in one loop that calls the respective "manage" function for each object (that's faster than using Caroutines, and I have more control about in which order they are managed). You can assign them events (like button events) for different things, like when they are destroyed, when windows are maximized, etc. In these functions you can also e.g. prevent a window from being maximized/closed etc. If "delegate based" means that you write your own function to access the messages of Windows windows and interfere with them, I guess the events can satisfy you. If not, you can change it like you want, because it's open source. @SchokoKeks: Yes, you can use you own bitmaps and change the sizes of all elements (even at runtime). The bitmaps that you finally see in the demo are made out of smaller ones and built up on runtime (have a look at the "files" folder ).
|
|
|
Re: LBGUI - Demo
[Re: Lukas]
#335138
07/26/10 21:25
07/26/10 21:25
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
You can assign them events (like button events) for different things, like when they are destroyed, when windows are maximized, etc. In these functions you can also e.g. prevent a window from being maximized/closed etc. That's what I meant with delegate based. Does this also count for data setup? Eg you have a function that returns an array of Strings that should be used for this table view and say the tableview: Use this function as data source?
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: LBGUI - Demo
[Re: Lukas]
#335159
07/27/10 03:45
07/27/10 03:45
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
Just fantastic. I can see this being extremely useful, for games as well as for making tools in the future Well done. Jibb
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: LBGUI - Demo
[Re: mk_1]
#335175
07/27/10 06:36
07/27/10 06:36
|
Joined: Jun 2008
Posts: 428
Rasch
Senior Member
|
Senior Member
Joined: Jun 2008
Posts: 428
|
Its just great. Some thinks you could add: - Marking the text (with mosue hold or shift and cursors) - Multiple Selection - Jumping trought the different fields with TAB Anyway its perfect. Thanks
|
|
|
Re: LBGUI - Demo
[Re: Rasch]
#335189
07/27/10 08:01
07/27/10 08:01
|
Joined: Jan 2004
Posts: 3,023 The Netherlands
Helghast
Expert
|
Expert
Joined: Jan 2004
Posts: 3,023
The Netherlands
|
Wow... this couldn't have come in on a better time for me ! I hope you release the header file soon so I can start making stuff with it. regards,
|
|
|
Re: LBGUI - Demo
[Re: Helghast]
#335244
07/27/10 12:53
07/27/10 12:53
|
Joined: May 2007
Posts: 2,043 Germany
Lukas
OP
Programmer
|
OP
Programmer
Joined: May 2007
Posts: 2,043
Germany
|
@Rasch: Making the text markable and multiple selection has already been asked for in this thread. The latter one has a good chance to be implemented in the contest release. About the tab thing: This would only make sense if all elements would somehow react on the mouse, but that's currently only the case for buttons and editboxes (of course). This would also require a system that makes one window "the" active window, which currently isn't the case. Personally, I only use tab to switch between different editboxes while filling out a form (like name and password). I could make a "tab event" or "key event" for editboxes so you can do that by yourself. @Helghast: It's going to be released soon when the contest begins. I guess in one week you can download it.
|
|
|
Re: LBGUI - Demo
[Re: Lukas]
#335254
07/27/10 13:41
07/27/10 13:41
|
Joined: May 2005
Posts: 2,713 Lübeck
Slin
Expert
|
Expert
Joined: May 2005
Posts: 2,713
Lübeck
|
Wenn jetzt noch der Code schöner ist als bei 3D Tetris 1, kann es ziemlich super sein . Edit: Sorry for the language... I noticed too late that this thread was english
Last edited by Slin; 07/27/10 13:41.
|
|
|
Re: LBGUI - Prerelease... kindof
[Re: Lukas]
#335729
07/30/10 11:29
07/30/10 11:29
|
Joined: Jul 2010
Posts: 283 Germany
jenGs
Member
|
Member
Joined: Jul 2010
Posts: 283
Germany
|
This is really great. The only thing that's missing now is a GUI-Editor And a "good" code editor. Because I hate to write BMAP definitions. And Code auto completion would be very usefull for a project like this (But thats JCL's problem not yours). Am I right, that you created the buttons/controls with the winapi, made them somehow "invisible" and created a graphics representation of each state in the engine? I tried this a year ago and failed with the message handling of the winapi. Again, great work. MfG, Ich
|
|
|
Re: LBGUI - Prerelease... kindof
[Re: jenGs]
#335734
07/30/10 11:48
07/30/10 11:48
|
Joined: May 2007
Posts: 2,043 Germany
Lukas
OP
Programmer
|
OP
Programmer
Joined: May 2007
Posts: 2,043
Germany
|
First, thanks to all who posted after I said thanks the last time. "Am I right, that you created the buttons/controls with the winapi, made them somehow "invisible" and created a graphics representation of each state in the engine?" You are wrong. I programmed the buttons and all other controls completely myself. They act like Windows buttons, because I examined the behaviour of the Windows buttons and made my buttons do the same. Maybe I'll make a GUI editor some time, but not in the near future...
|
|
|
LBGUI - RELEASE!
[Re: Lukas]
#336054
08/01/10 12:08
08/01/10 12:08
|
Joined: May 2007
Posts: 2,043 Germany
Lukas
OP
Programmer
|
OP
Programmer
Joined: May 2007
Posts: 2,043
Germany
|
Now the deadline is over as it's the 1st of August even in GMT-12. So there is no reason to hide the source code anymore. Here you go: http://www.brogames.de/LBGUI/LBGUI.zip(~687KB) This is the contest release. It's much smaller than the first two downloads as this doesn't include an exe anymore. I put the other downloads down, as especially in the first demo I gave you there were some small bugs, which are now fixed. Credits would be nice.
|
|
|
Re: LBGUI - RELEASE!
[Re: TerraSame]
#342450
09/27/10 22:24
09/27/10 22:24
|
Joined: Jun 2001
Posts: 1,004 Dossenbach
nfs42
Serious User
|
Serious User
Joined: Jun 2001
Posts: 1,004
Dossenbach
|
Hi, based on this cool lbgui i've started GSTGUI with only one skinfile instead of 120 files to show the usage of SpriteSheetPacker2LiteC. Look here
Andreas GSTools - Home of GSTScript 0.9.8: lua scripting for A6/7/8 GSTNet 0.7.9.20: network plugin for A6/7/8 GSTsqlite 1.3.7: sql database plugin for A6/7/8 3DGS Codebase: 57 snippets || 3DGS Downloads: 248 files
|
|
|
Re: LBGUI - RELEASE!
[Re: nfs42]
#342765
09/30/10 19:11
09/30/10 19:11
|
Joined: May 2007
Posts: 2,043 Germany
Lukas
OP
Programmer
|
OP
Programmer
Joined: May 2007
Posts: 2,043
Germany
|
So you made a tool to puts all skins into one file and added some functions to LBGUI? Nice. But you lost the alpha channel of the window borders. And you just took my demo and changed it, leaving many things like they were, making the texts confusing, lol. And why does a MessageBox need to be resizable? Btw, your demo freezes when I try to close it.
|
|
|
Re: LBGUI - RELEASE!
[Re: Lukas]
#343604
10/07/10 20:03
10/07/10 20:03
|
Joined: Jul 2010
Posts: 283 Germany
jenGs
Member
|
Member
Joined: Jul 2010
Posts: 283
Germany
|
Hi Lukas, Your Gui System is great. At the moment I am creating a small addition to your header with procedural rendered graphics, because I hate to copy/create Bitmaps every time I need a gui in a small test project. Until now it is only a plain Win98 style, because that's enough for prototypes and small tools. My problem is: My window borders are very small bitmaps (6 x 16 pix). I have seen that you have used bmap_blitt to resize your windows. The problem is, that my small graphics get "washed out" through the blitting/resizing. I hope you understand my problem My graphics are exact fitting on eachothers edges, but blurred horizontaly. I don't completly understand the algorithm of the bmap_blitt function. I checked your function and saw that you use the original hight of the middle Titlebar. But it is blurred out as if it would have been scaled in y direction. My suggestion: What do you think? Is it usefull to rewrite the scaling function and use the panel element "window". Of course you need a long bitmap with the length of the maximum resolution, but it would be an enorm gain of speed when it comes to resizing.
|
|
|
Re: LBGUI - RELEASE!
[Re: jenGs]
#343605
10/07/10 20:33
10/07/10 20:33
|
Joined: May 2007
Posts: 2,043 Germany
Lukas
OP
Programmer
|
OP
Programmer
Joined: May 2007
Posts: 2,043
Germany
|
Yeah, I know bmap_blit doesn't work like I would want it. If you look carefully at the (in the examples) black area of a window, you see some kind of lines, which are also artefacts of the bmap_blit scaling.
Your idea with the windows might work, but this would require creating a bitmap that is big enough so it's always bigger than the window. As it would seem senseless to create such big bitmaps in files, I guess it would make sense to create them procedurally with many bmap_blit commands. But I think this would be much slower than one bmap_blit command, although it normally could be faster if bmap_blit had an option for "nearest neighbour" interpolation. That's why I would hate using workarounds like this. I would prefer an option to scale bitmaps fast without getting them blurred. Also, this would destroy the possibility to have a border bitmap with a width of more than 1 pixel, which is then scaled.
But if you think it would be useful for your project, you could rewrite this part of LBGUI yourself. I currently don't have the time for an update like this anyway.
If your window doesn't need to be resized, you could also create a bitmap for the whole window and then assign window->panel->bmap to that bmap each time your window is updated.
|
|
|
Re: LBGUI - RELEASE!
[Re: Lukas]
#343619
10/08/10 02:14
10/08/10 02:14
|
Joined: Jul 2010
Posts: 283 Germany
jenGs
Member
|
Member
Joined: Jul 2010
Posts: 283
Germany
|
So, I tried it and it worked well. the "window" element of the PANEL struct has a nice habbit. If you use a bitmap that has the power of 2 it will be repeatet, when you exceed the borders of the given bitmap in dx or dy. With this method you can use very small bitmaps, without interpolated pixels. I removed every blitting operation in your header (concering the Windows) and I removed the bmap_createblack command ind the window_update function. The update function only sets the window elements positions new and scales the borders and the content. The speed gain is huge. When I cleaned up the code tomorrow (or weekend) I will upload it. I don't now If I am boring you with this posts I hope not.
|
|
|
Re: LBGUI - RELEASE!
[Re: jenGs]
#343637
10/08/10 10:46
10/08/10 10:46
|
Joined: May 2007
Posts: 2,043 Germany
Lukas
OP
Programmer
|
OP
Programmer
Joined: May 2007
Posts: 2,043
Germany
|
Nice, I didn't know about this behaviour of window elements. In this case, window elements are a nice and much more efficient solution for resizable windows. When I finally get the time to make an update for LBGUI, I'll propably include your solution and add a flag for this, so you could still use the old method for backwards compatibility. I was going to make an update for LBGUI anyway, as I'm currently adding some small features for one of my projects, and I need to do some bugfixes. But as I said, I currently don't have the time... I'm looking forward to trying your code. "I don't now If I am boring you with this posts I hope not." Yaaaawn... what? No, seriously, you are not boring me, always like to see better solutions for my problems.
|
|
|
Re: LBGUI - RELEASE!
[Re: Lukas]
#343761
10/09/10 22:46
10/09/10 22:46
|
Joined: Jul 2010
Posts: 283 Germany
jenGs
Member
|
Member
Joined: Jul 2010
Posts: 283
Germany
|
Hi, Here is my Project. I had not the time to clean the code. It is a bit unclean here and there. To test my modifications you have to run the "render.c". I used your split scripts, because SED realy sucks when you open big files. Until now I only modified "lbgui_windowfunc.h": I copied "LBG_window_border_bitmap" function to(LBG_window_border_bitmap_n) and "LBG_window_content_bitmap" function to(LBG_window_content_bitmap_n) you will see. The panels (content and panel) still have the bitmaps attached. With the window elements, you could delete them completly, of yourse with backward compatibility in mind you should not. Link: Project I have a small problem with your gui system. - My mouse Mode is 4 - I am in fullscreen mode - A mouse_map is attached Problem: The mouse flickers when I am on top of the titlebar MfG, Me
|
|
|
Re: LBGUI - RELEASE!
[Re: Lukas]
#343853
10/10/10 20:14
10/10/10 20:14
|
Joined: Jul 2010
Posts: 283 Germany
jenGs
Member
|
Member
Joined: Jul 2010
Posts: 283
Germany
|
I know Win98 is not very nice. And it is a bit too small for big HD resolution. I am working on a tool to create your own procedural rendered graphics (with alpha channel). It is like a paint programm with the typical brushes. The generated code will be loaded and parsed by my lite-c header. So you start the generator with the filename as parameter and then LBGUI. At the moment I am trying to find the flickering problem. It only appears consequent, when a window is maximized.
|
|
|
Re: LBGUI - RELEASE!
[Re: lostclimate]
#348345
11/25/10 10:18
11/25/10 10:18
|
Joined: Oct 2005
Posts: 4,771 Bay City, MI
lostclimate
Expert
|
Expert
Joined: Oct 2005
Posts: 4,771
Bay City, MI
|
its weird, i can get it to work properly within the scope of the same function, but lets say I try to read it in a function called by a button, it comes back as an empty pointer.
EDIT:wtf! sooooo much work, only to realize it was an error because I was destoying the parent just before I tried to access it... problem solved.
Last edited by lostclimate; 11/25/10 11:29.
|
|
|
Re: LBGUI - RELEASE
[Re: 3run]
#354866
01/22/11 19:58
01/22/11 19:58
|
Joined: Oct 2007
Posts: 5,210 Ä°stanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
|
was working on a new theme for lbgui, but then accidentaly saved wrong files over them. Going to remake them though.
Last edited by Quadraxas; 01/22/11 19:58.
3333333333
|
|
|
Re: LBGUI - RELEASE
[Re: SchokoKeks]
#355826
01/29/11 12:23
01/29/11 12:23
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
Serious User
|
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
What you could also implement is an easy interface. I saw this in other c-libraries. If you don't need the full functionality of the library you can use the easy interface: It has functions with less parameters and functionality but are shorter and easier to use.
I saw such an easy interface wrapper in the lite-c contributions, but it could also be implemented by default.
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: LBGUI - RELEASE
[Re: Rondidon]
#355838
01/29/11 13:43
01/29/11 13:43
|
Joined: Sep 2003
Posts: 303 Germany
Clemens
Senior Member
|
Senior Member
Joined: Sep 2003
Posts: 303
Germany
|
I really like the LBGUI - even if I didn't worked a lot with it YET and it get some critics... Implement some of the suggestions like making it more structural/user friendly and implement the most important features like multiline text field, text selection and copy/past - would be awesome Thanks anyway for that good stuff! (who knows when ever conitec would have released their GUI DLL -> but I remember it had a "high priority" until it was removed - guessing cause of Lukas' GUI )
|
|
|
Re: LBGUI - RELEASE
[Re: Clemens]
#355870
01/29/11 16:49
01/29/11 16:49
|
Joined: May 2007
Posts: 2,043 Germany
Lukas
OP
Programmer
|
OP
Programmer
Joined: May 2007
Posts: 2,043
Germany
|
Thanks for the kind words. The skin.c is a good idea. I can make it be usable as a header script that is included at the beginning of the main script for all who want to use the default skin. Before I'd make an editor, I think it would be useful to make an XML-like syntax for defining GUI elements. Then I could make an editor that creates those XML files. Those files would then be easier to be reopened by the editor. But if I can ever do that it will be in the far future... An improved API and multiline text fields will certainly be part of an update some time.
Last edited by Lukas; 01/29/11 21:33.
|
|
|
Re: LBGUI - RELEASE
[Re: Dark_samurai]
#355875
01/29/11 17:20
01/29/11 17:20
|
Joined: Oct 2007
Posts: 5,210 Ä°stanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
|
i have a undocumented XML plugin ready, i can document it fast if you need it.
read/write,iterate walkthrough etc all available, tinyxml wrapper.
Last edited by Quadraxas; 01/29/11 18:34.
3333333333
|
|
|
Re: LBGUI - RELEASE
[Re: Lukas]
#355884
01/29/11 18:27
01/29/11 18:27
|
Joined: Oct 2007
Posts: 5,210 Ä°stanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
|
hmm... i got some ideas, but do not want to tell them before i am sure about them.
3333333333
|
|
|
Re: LBGUI - RELEASE
[Re: Clemens]
#355892
01/29/11 18:58
01/29/11 18:58
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
Serious User
|
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
Maybe jcl implements a .c library for xml reading/writing if we ask him. Sounds like a useful feature to me (saving configs, savegame, ...).
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: LBGUI - RELEASE
[Re: Dark_samurai]
#355893
01/29/11 19:06
01/29/11 19:06
|
Joined: Sep 2003
Posts: 9,859
FBL
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 9,859
|
|
|
|
Re: LBGUI - RELEASE
[Re: Lukas]
#381107
08/24/11 11:38
08/24/11 11:38
|
Joined: Sep 2003
Posts: 303 Germany
Clemens
Senior Member
|
Senior Member
Joined: Sep 2003
Posts: 303
Germany
|
An improved API and multiline text fields will certainly be part of an update some time.
Dear Lukas, is there any (multiline!!;)) soon update we can look forward to? Best regards, clemens
|
|
|
Re: LBGUI - RELEASE
[Re: Lukas]
#381344
08/26/11 18:45
08/26/11 18:45
|
Joined: Sep 2003
Posts: 303 Germany
Clemens
Senior Member
|
Senior Member
Joined: Sep 2003
Posts: 303
Germany
|
Sounds great! You've got post
Last edited by Clemens; 08/26/11 18:46.
|
|
|
Re: LBGUI - RELEASE
[Re: Lukas]
#392962
01/29/12 22:54
01/29/12 22:54
|
Joined: Oct 2008
Posts: 513
Carlos3DGS
User
|
User
Joined: Oct 2008
Posts: 513
|
I am having a little problem with an option from the manuall: I have a working gui with this, and movable windows, but you can lose them if dragged outside the engine window. The GUI itself also has flags, which are stored in the global long LBG_flags. The following flags are available: LBGUI_RUNNING - The GUI is running (it has been opened). LBGUI_DISABLED - Disables the whole GUI. LBGUI_PROTECTMOUSE - If the mouse is outside the engine window, the GUI considers the mouse as at the border of the window. This prevents windows to be moved outside the window, where they would be lost. LBGUI_STOPACTION - Stops an action that is normally executed after certain events. This flag is enabled by LBG_stop_action.
I am not sure how to do this, I tried setting the flag several ways but couldn't get it to work:
LBGUI_PROTECTMOUSE=1;
set(LBG_flags,LBGUI_PROTECTMOUSE);
Any advice would be great to set this flag. P.S: How is that multiline textbox update going? Is it still being worked on?
Last edited by Carlos3DGS; 01/30/12 02:19.
|
|
|
Re: LBGUI - RELEASE
[Re: Espér]
#393001
01/30/12 13:28
01/30/12 13:28
|
Joined: Oct 2008
Posts: 513
Carlos3DGS
User
|
User
Joined: Oct 2008
Posts: 513
|
I finally got it to work like this:
LBG_flags |= LBGUI_PROTECTMOUSE;
Could someone explain to me why that line works and this one dosn't?:
set(LBG_flags,LBGUI_PROTECTMOUSE);
I think I am not getting something about how LBGUI_PROTECTMOUSE and set() works.
|
|
|
Re: LBGUI - RELEASE
[Re: Carlos3DGS]
#393003
01/30/12 13:36
01/30/12 13:36
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
You second code snippet is a macro, so that your code gets replaced to:
LBG_flags->flags |= (LBGUI_PROTECTMOUSE);
which is of course rubbish. Only use the "set" macro for entities.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: LBGUI - RELEASE
[Re: Carlos3DGS]
#393260
02/01/12 18:58
02/01/12 18:58
|
Joined: May 2007
Posts: 2,043 Germany
Lukas
OP
Programmer
|
OP
Programmer
Joined: May 2007
Posts: 2,043
Germany
|
An Abitur is the final exams of the "Gymnasium", the highest branch of the three-branch school system in Germany. http://en.wikipedia.org/wiki/AbiturI'm pretty sure LBG_mouse_over_object works for all LBGUI objects, not just windows, because internal LBGUI functions also use that function for the same purpose. But to make sure the mouse is really over that object and no other window is covering it, you should do it like this:
if(LBG_mouse_over_object(obj) && (obj->parent == LBG_mouse_window()) && LBG_window_mouse_over_content (obj->parent))
{...}
If it's a button with a Condition function, you should also include this: LBG_button_condition(but,but->Condition)
|
|
|
Re: LBGUI - RELEASE
[Re: Lukas]
#393277
02/01/12 20:36
02/01/12 20:36
|
Joined: Oct 2008
Posts: 513
Carlos3DGS
User
|
User
Joined: Oct 2008
Posts: 513
|
I'm not sure if I am not understanding you correclty or mabe I explained myself wrong before. Let's say I have a lot of UI components (created with LBGUI) on the screen. And I also have a separate function that creates an entity in the 3d view when I left click. What I want is for the entity not to be created when the click is on any of all the LBGUI objects. So if I am clicking on interface elements the 3d objects are not created, but if I click on the view (where there is no GUI element) then the object is created as it normally would. What I'm looking for is some global variable that I can check if the mouse has a an LBGUI element under it or not. something like the 3DGS mouse_panel, to do something like this:
if((mouse_left)&&(!mouse_panel))
{
//create entity in 3d view
}
I have tried to search for a similar global variable in your manual for LBGUI but I can't seem to find an equivalent to mouse_panel. In your previous example something did draw my attention: "LBG_window_mouse_over_content" But I searched for it in the manual and couln't find it, so I'm not quite sure how it works or what it does exactly. It might do what I am trying to achieve? P.S: If I understood you correctly an Abitur would be something like "Selectividad" here. The last and toughest exam (series of exams) before entering university, that conditions what careers you can study and what universities you can go to? I wish you the best of luck on your Abitur!
|
|
|
Re: LBGUI - RELEASE
[Re: Carlos3DGS]
#393280
02/01/12 20:55
02/01/12 20:55
|
Joined: May 2007
Posts: 2,043 Germany
Lukas
OP
Programmer
|
OP
Programmer
Joined: May 2007
Posts: 2,043
Germany
|
Hmm, the only thing that comes close to such a global variable is LBG_mouse_window() which returns the window the mouse is currently over. If the mouse is over no window, it returns 0. Of course, this will only be helpful if the view you are talking about is not on a view. If your view is on a window, I guess the solution would be going through all LBGUI objects using their linked lists, as described on the intro page of the LBGUI manual. Or, if most of your LBGUI objects are on windows you could cover those with LBG_mouse_window() and the rest manually. P.S: If I understood you correctly an Abitur would be something like "Selectividad" here. The last and toughest exam (series of exams) before entering university, that conditions what careers you can study and what universities you can go to? I never heard of the Selectivdad, but what you description of it almost fits the Abitur, too. But if you pass the Abitur you can chose to study anything you like (if the university takes you), unless it's a "Fachabitur" which is more specialized. I wish you the best of luck on your Abitur! Thanks!
|
|
|
Re: LBGUI - RELEASE
[Re: Lukas]
#393281
02/01/12 21:27
02/01/12 21:27
|
Joined: Oct 2008
Posts: 513
Carlos3DGS
User
|
User
Joined: Oct 2008
Posts: 513
|
Thankyou very much, that looks exactly like what I needed! And it's in the manual too, but when I first saw that function I discarded it because I thought it wouldn't work if it was over a button or some other elemnent of a window. But I just did a test and it works perfectly no matter what element of the windows it is over. here is an example for anyone else that might run into this problem in the future:
if((mouse_left)&&(LBG_mouse_window()==0))
{
//shoot,create,select,etc... whatever you want
}
|
|
|
Re: LBGUI - RELEASE
[Re: Espér]
#396645
03/08/12 20:02
03/08/12 20:02
|
Joined: Mar 2012
Posts: 3
helloMoto
Guest
|
Guest
Joined: Mar 2012
Posts: 3
|
Hello! I have a problem, i'm trying to use a combobox and get the result selected. I'm looking for a example in internet and in the forum. Please, I need help.
void comboClick()
{
LBG_LISTITEM* item;
if(comboboxForeign->chosen_option!=NULL)
{
printf(comboboxForeign->chosen_option->caption);
}
else printf("No selected");
}
...
comboboxForeign = LBG_create_combobox(window_menu,30, 110, 256, 16, 4, "Select the language", LBG_ebmaps(editbox_left_tga,editbox_middle_tga,editbox_right_tga), 16, 16, 224, &listbox_bmaps, LBG_bbmaps(combobox_button1_tga,combobox_button2_tga,combobox_button3_tga,combobox_button1_tga,combobox_button2_tga,combobox_button1_tga), CBF_SHOW);
LBG_create_listitem (comboboxForeign->menu, 100, strSpanish, 0);
LBG_create_listitem (comboboxForeign->menu, 100, strEnglish, 0);
LBG_create_listitem (comboboxForeign->menu, 100, strChinese, 0);
comboboxForeign->Open=comboClick;
comboboxForeign->Close=comboClick;
comboboxForeign->Destroy=comboClick;
The problem is that when i close, the printf don't show the correct selected item text, only show rubish. I looked the manual but i didn't see nothing about. Please, help. Thanks a lot!
|
|
|
Re: LBGUI - RELEASE
[Re: helloMoto]
#396647
03/08/12 20:10
03/08/12 20:10
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
Expert
|
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
that´s cause you just need comboboxForeign->caption The combobox is an editobox object, so it handles the caption string of the chosen item by itself ^^ Little Question to Lukas: Any chance to get file/object trees? I don´t need folder support, but file/subfile/sub-subfile support would be great ^^
|
|
|
Re: LBGUI - RELEASE
[Re: Espér]
#396649
03/08/12 20:20
03/08/12 20:20
|
Joined: May 2007
Posts: 2,043 Germany
Lukas
OP
Programmer
|
OP
Programmer
Joined: May 2007
Posts: 2,043
Germany
|
Little Question to Lukas: Any chance to get file/object trees? I don´t need folder support, but file/subfile/sub-subfile support would be great ^^ Maybe, but don't count on it. Especially not for the near future. I'm pretty certain I'm going to release an update this year, but it won't contain trees yet. Things like multiline textboxes are more important.
|
|
|
Re: LBGUI - RELEASE
[Re: Espér]
#396657
03/08/12 20:54
03/08/12 20:54
|
Joined: Mar 2012
Posts: 3
helloMoto
Guest
|
Guest
Joined: Mar 2012
Posts: 3
|
that´s cause you just need comboboxForeign->caption
The combobox is an editobox object, so it handles the caption string of the chosen item by itself ^^
Thanks, Espér. But I have the same problem. The printf show me the text: q[] It's so wrong.
void comboClick()
{
if(comboboxForeign->chosen_option!=NULL)
{
printf(comboboxForeign->caption);
printf((comboboxForeign->editbox->text.pstring)[0]);
printf(comboboxForeign->editbox->caption);
(pruebas_txt.pstring)[0]=comboboxForeign->caption;
}
else printf("No selected");
}
¿Any ideas? If anybody knows some example of this, i will looked. Thanks brothers!
|
|
|
Re: LBGUI - RELEASE
[Re: helloMoto]
#396658
03/08/12 20:59
03/08/12 20:59
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
Expert
|
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
when i look at the code.. Did you say the combobox to use a Select script? i did it this way:
LBG_COMBOBOX* combobox1 = 0;
void combobox_clicked()
{
wait(1);
//object_category_string
str_cpy(object_category_string, combobox1->caption);
call_kategorie(-kategorie);
if(edit_property_text_open == 1)
{
empty_texture_list();
change_texture_list(wich_skinnumber);
}
}
STRING* combobox_category = "";
void call_file_category()
{
var ysize = screen_size.y-(bmap_height(bmedit_gui_top)+(bmap_height(bmedit_gui_bottom)+128));
var xsize = bmap_width(bmedit_gui_lm)-6;
var yposition = bmap_height(bmedit_gui_top)+128;
combobox1 = LBG_create_combobox(0, 0, yposition, xsize, 4, 4, "1 - Vatikan", LBG_ebmaps(editbox_left_tga,editbox_middle_tga,editbox_right_tga), 4, 4, xsize-4, &listbox_bmaps, LBG_bbmaps(combobox_button1_tga,combobox_button2_tga,combobox_button3_tga,combobox_button1_tga,combobox_button2_tga,combobox_button1_tga), CBF_SHOW);
combobox1->menu->layer = 2010;
combobox1->editbox->layer = 2010;
combobox1->button->layer = 2010;
combobox1->layer = 2010;
combobox1->menu->font = list_font;
combobox1->menu->itemheight = 20;
combobox1->menu->bmaps_over.bmap_left = listitem_over_left_tga;
combobox1->menu->bmaps_over.bmap_middle = listitem_over_middle_tga;
combobox1->menu->bmaps_over.bmap_right = listitem_over_right_tga;
combobox1->menu->bmaps_marked.bmap_left = listitem_marked_left_tga;
combobox1->menu->bmaps_marked.bmap_middle = listitem_marked_middle_tga;
combobox1->menu->bmaps_marked.bmap_right = listitem_marked_right_tga;
var fhandle;
fhandle= file_open_read("kdata.nfg");
while(1)
{
file_str_read(fhandle, combobox_category);
if(str_cmpi(combobox_category, "ENDE") == 0)
{LBG_create_listitem(combobox1->menu, 100, combobox_category, 0);}
else
{break;}
wait(1);
}
file_close(fhandle);
vec_set(combobox1->menu->color_default,vector(1,1,1));
vec_set(combobox1->menu->color_over,vector(255,1,1));
vec_set(combobox1->menu->color_marked,vector(1,1,1));
LBG_editbox_set_text_color(combobox1->editbox,vector(1,1,1));
combobox1->menu->Select=combobox_clicked; //giving each listitem the select function
LBG_update_combobox(combobox1);
}
And it´s working
|
|
|
Re: LBGUI - RELEASE
[Re: Espér]
#396699
03/09/12 08:36
03/09/12 08:36
|
Joined: Mar 2012
Posts: 3
helloMoto
Guest
|
Guest
Joined: Mar 2012
Posts: 3
|
Thank you for your attention!! I'm a beginner: Printf has a char* parameter not a *STRING parameter. Thanks a lot!
|
|
|
Re: LBGUI - RELEASE
[Re: Lukas]
#397903
03/25/12 03:04
03/25/12 03:04
|
Malice
Unregistered
|
Malice
Unregistered
|
EDIT*** Nevermind I got it. These doc and examples are not newbie friendly. Maybe one day I'll be a pro like most of you.
I'm a newbie so I'm sure this will be a newbie question. I have LBG_windows that are created at runtime randomly. Their pointers are local to the function, they are suposed to be destory when the 'OK' button is click, but from what I can tell in the manual the parent windows pointer is not passed to the button event function. If only one window was on screen then I could set the window pointer to a globel pointer at time of creaation and use that in the button event function. But I have many windows open at once. How do I pass the pointer of the parent window to the button event function???
Thanks Malice
Last edited by Malice; 03/25/12 03:36.
|
|
|
Re: LBGUI - RELEASE
[Re: ]
#400123
04/26/12 08:08
04/26/12 08:08
|
Joined: Apr 2005
Posts: 795 U.S.A. Michigan
exile
User
|
User
Joined: Apr 2005
Posts: 795
U.S.A. Michigan
|
-Please remove post
Last edited by exile; 04/27/12 10:07.
|
|
|
Re: LBGUI - RELEASE
[Re: exile]
#417355
02/11/13 21:15
02/11/13 21:15
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
Senior Member
|
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
First I like of the say that is really good LBGUI. TANKS Lukas. I want to take this opportunity to ask for help to solve a problem I'm not able to solve alone!.
How could I do for my (Vertical Scrolling), of the my LISTBOX, roll yourself Whenever I add a new ITEM on the list?
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
Re: LBGUI - RELEASE
[Re: Lukas]
#417370
02/11/13 22:59
02/11/13 22:59
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
Senior Member
|
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
Oh Yea. Its Work Lukas. Tanks (^.^)
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
Re: LBGUI - RELEASE
[Re: NeoNeper]
#417808
02/18/13 08:19
02/18/13 08:19
|
Joined: May 2010
Posts: 117 Germany , Dortmund
Bone
Member
|
Member
Joined: May 2010
Posts: 117
Germany , Dortmund
|
Hi,
I want to use LBGUI for my project but I have a problem. I want to hide a window and show it later again so I tried to remove the WF_SHOW Flag but nothing happen, also with LBG_update_window. After that, I thought I have to recreate the Window because its destroyed with a click on the close button but it seems that its still there but invisible. How do I do it correctly?
My second problem is, that the listbox/listitems of a combobox doesnt react on mouse click where the combobox listbox overlays an other listbox. I tried to set the layer of the combobox and the combobox menu to a high value but it doesnt work. The menu listbox is visible but how i explained, it doesnt react on the mouse where it overlays an other listbox. How can I solve this?
Thanks
Last edited by Bone; 02/18/13 11:51.
|
|
|
Re: LBGUI - RELEASE
[Re: Bone]
#417817
02/18/13 11:48
02/18/13 11:48
|
Joined: Jul 2005
Posts: 187
lostzac
Member
|
Member
Joined: Jul 2005
Posts: 187
|
to destroy a window look at LBG_WINDOW* LBG_destroy_window (LBG_WINDOW* win) in the manual....
John C Leutz II
|
|
|
Re: LBGUI - RELEASE
[Re: Lukas]
#417820
02/18/13 13:28
02/18/13 13:28
|
Joined: May 2010
Posts: 117 Germany , Dortmund
Bone
Member
|
Member
Joined: May 2010
Posts: 117
Germany , Dortmund
|
Thanks Lukas, this is my function I use to create the combobox and listbox in a window
window_linemanager = LBG_create_window(0, 96, 64, 512, 400, 12, 1,"Linienmanager",&win_bbmaps,&win_cbmaps,&win_tbmaps,1, 0, WF_SHOW | WF_XBUTTON | WF_MAXBUTTON | WF_RESIZABLE );
window_linemanager->xbutton_offx = -25;
window_linemanager->xbutton_offy = 1;
window_linemanager->minsize_x = 64;
window_linemanager->minsize_y = 64;
window_linemanager->tpos_y = 8;
// Combobox für Linienfilter
LBG_COMBOBOX* combobox_linefilter = LBG_create_combobox(window_linemanager, 10, 40, 240,16, 4, "Alle", LBG_ebmaps(editbox_left_tga,editbox_middle_tga,editbox_right_tga), 16, 16, 224, &listbox_bmaps, LBG_bbmaps(combobox_button1_tga,combobox_button2_tga,combobox_button3_tga,combobox_button1_tga,combobox_button2_tga,combobox_button1_tga), CBF_SHOW);
// Comboboxes have a member listbox called menu. To add options to the combobox, we just have to add items to its menu:
LBG_create_listitem (combobox_linefilter ->menu, 100, "Alle", 0);
LBG_create_listitem (combobox_linefilter ->menu, 100, "Zug", 0);
LBG_create_listitem (combobox_linefilter ->menu, 100, "Straßenbahn", 0);
LBG_create_listitem (combobox_linefilter ->menu, 100, "Transrapid", 0);
LBG_create_listitem (combobox_linefilter ->menu, 100, "Monorail", 0);
LBG_create_listitem (combobox_linefilter ->menu, 100, "Bus und Lkw", 0);
LBG_create_listitem (combobox_linefilter ->menu, 100, "Schiff", 0);
LBG_create_listitem (combobox_linefilter ->menu, 100, "Flugzeug", 0);
// Linien Liste
// Create a listbox
list_lines = LBG_create_listbox (window_linemanager, 10, 70, 240, 256, 16, 16, 220, 230, &listbox_bmaps, LF_SHOW | LF_AUTOVSCROLL);
list_lines->tpos_x = 4; // This sets the text position of the items of this list relative to their positions
list_lines->tpos_y = 1;
list_lines->itemheight = 20; // This sets the height of the list items and thus the distance of two items. On default, the height is LBG_listitem_font.dy
list_lines->bmaps_over.bmap_left = listitem_over_left_tga; // This determines the bitmap of the list items, when the mouse is over them.
list_lines->bmaps_over.bmap_middle = listitem_over_middle_tga;
list_lines->bmaps_over.bmap_right = listitem_over_right_tga;
list_lines->bmaps_marked.bmap_left = listitem_over_left_tga; // This determines the bitmap of the list items, when they are selected.
list_lines->bmaps_marked.bmap_middle = listitem_over_middle_tga;
list_lines->bmaps_marked.bmap_right = listitem_over_right_tga;
LBG_create_vscrollbar(list_lines, LBG_vsbmaps (vscrollbar_top_tga,vscrollbar_middle_tga,vscrollbar_bottom_tga,vscrollbar_bar_tga), LBG_bbmaps(vscrollbar_up1_tga,vscrollbar_up2_tga,vscrollbar_up3_tga,vscrollbar_up1_tga,vscrollbar_up2_tga,vscrollbar_up1_tga), LBG_bbmaps(vscrollbar_down1_tga,vscrollbar_down2_tga,vscrollbar_down3_tga,vscrollbar_down1_tga,vscrollbar_down2_tga,vscrollbar_down1_tga), VSF_SHOW);
LBG_update_listbox(list_lines);
Its only possible to select the first listitem of the combobox menu. Whats wrong? I have another question. I add some listitems to the listbox 'list_lines' and assign a Select function to the listbox. In this function I want to get the number of the selected listitem like this:
function selectLine(){
selectedLineItem = list_lines.marked_item;
num_selectedLineItem = LBG_object_getnum(list_lines, selectedLineItem);
}
But num_selectedLineItem is always 0, else if I dont select the first listitem . How get I the correct number of the selected listitem?
Last edited by Bone; 02/18/13 13:29.
|
|
|
Re: LBGUI - RELEASE
[Re: Bone]
#417980
02/20/13 00:43
02/20/13 00:43
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
Senior Member
|
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
is there any way to use parameters in the event function of the button? Sample: mybuttom->Event = myfunction(myparamiter);
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
Re: LBGUI - RELEASE
[Re: NeoNeper]
#418061
02/20/13 15:45
02/20/13 15:45
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
Serious User
|
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
@NeoNapper: What are you trying to do? Calling an event with a parameter or somehow attach a routinepointer with predefined parameters?!
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: LBGUI - RELEASE
[Re: Rackscha]
#418076
02/20/13 19:56
02/20/13 19:56
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
Senior Member
|
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
I do not know what it means "routinepointer" One solution that I usually use is:
//only logic
LBG_BUTTON* button_test (..., ..., ..., ..., NULL); //event function NULL
...
//Function thread for button press
...
while(button_test)
{
//if mouse over
//if mouse left
//work parameters
}
I am creating a chat system for an MMO that I'm working. for each player who talk to me in private chat, I create a LISTBOX and a BUTTON. If there is any SIMPLER WAY, PLEASE TEACH ME Preview.
Last edited by NeoNeper; 02/20/13 20:04.
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
Re: LBGUI - RELEASE
[Re: NeoNeper]
#418760
03/01/13 02:44
03/01/13 02:44
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
Senior Member
|
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
I'm having trouble creating a function that removes all items within a ListBox.
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
Re: LBGUI - RELEASE
[Re: NeoNeper]
#418779
03/01/13 14:18
03/01/13 14:18
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
Senior Member
|
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
I'm doing this way, but not working correctly.
void clean_log()
{
//number of items in the list
int total = LBG_object_getnum(_listbox->item_first,LBG_object_last(_listbox));
int ping; //for loop
for(ping =0; ping < total; ping ++)
{
LBG_destroy_listitem(_listbox->item_first);
_listbox->item_first = _listbox->item_first->next;
}
}
I believe the problem is the following reason: I am destroying the ITEM before knowing what is next on the list. LBG_destroy_listitem(_listbox->item_first); _listbox->item_first = _listbox->item_first->next; ?????? know someone give me an idea?
Last edited by NeoNeper; 03/01/13 14:24.
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
Re: LBGUI - RELEASE
[Re: NeoNeper]
#418872
03/02/13 15:08
03/02/13 15:08
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
Senior Member
|
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
this work!.
void clean_log()
{
//number of items in the list
int total = LBG_object_getnum(_listbox->item_first,LBG_object_last(_listbox));
int ping; //for loop
LBG_LISTITEM* item_old;
for(ping =0; ping <= total; ping ++)
{
item_old = _listbox->item_first->next;
LBG_destroy_listitem(_listbox->item_first);
_listbox->item_first = item_old;
}
}
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
Re: LBGUI - RELEASE
[Re: NeoNeper]
#419075
03/05/13 20:58
03/05/13 20:58
|
Joined: Aug 2003
Posts: 180 Reactor Core
NeutronBlue
Member
|
Member
Joined: Aug 2003
Posts: 180
Reactor Core
|
This is exactly what I've been looking for - THANKS!! (There used to be a GUIControls package years ago, now I can't find it...)
I just downloaded your package today, and the files are dated around July 2010.
Am I using the correct link? - Did I miss an update somewhere?
Thanks Again.
Dreaming ain't Doing..! <sigh> Darn semicolons - I always manage to miss at least 1..!
|
|
|
Re: LBGUI - RELEASE
[Re: NeutronBlue]
#419083
03/05/13 22:53
03/05/13 22:53
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
Senior Member
|
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
I just downloaded your package today, and the files are dated around July 2010.
Am I using the correct link? - Did I miss an update somewhere?
I'm also using this package. Doubt:
LBG_LISTITEM* item_folow = LBG_rightclick_add_option(_lbgrightclick1,1,"Seguir",LIF_SHOW,NULL);
//Its work, the item is created
Once created an item in a LBG_RIGHTCLICK* I can not make it invisible. Sample:
reset(item_folow,LIF_SHOW); //no WORK
//or
item_folow.flags &= ~LIF_SHOW); //no WORK
Why? how can I do this?
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
Re: LBGUI - RELEASE
[Re: NeoNeper]
#419644
03/12/13 22:33
03/12/13 22:33
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
Senior Member
|
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
I continue with this problem and I can not solve! Anyone know give me a hand? reset(item_folow,LIF_SHOW); in LBG_RIGHTCLICK* no work.
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
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.
|
|
|
Re: LBGUI - RELEASE
[Re: 82RJZAE]
#423519
05/31/13 15:52
05/31/13 15:52
|
Malice
Unregistered
|
Malice
Unregistered
|
EDIT* Ok I understand. If the text object is fully clipped the use any TEXT objects. Or if not the maybe many string. strings =10; ect... Or like before invisible window that is large then the screen or use a non-lbgui text and scroll it with user function.
EDIT* have you looked for it in demo.c? And Why is your text item outside the window? It doesn't make sense for a child object to be outside the parent.
EDIT2* You want the text object to be bigger then and outside the window. Why not put it in a lager invisible window (&bbmaps = NULL, &cbmaps = NULL) ..? I'm just not clear on what you trying to do so I'm having trouble solving it.
Without looking into it.
Get a Text with x(10) strings then move the content of the strings up and down with str_cpy. You need 1 outside string to hold the string content that has go above the text ( i.e. copied out of text.pstring[0] ). When the first string goes out of the text copy append it to the outside string and mark its begin and end points in a 2x array (v[10]10]). If all 10 strings go above the text then that are all contained in the holder string as one long string.
That's just off the top of my head. I'd have to look into LBG to see how that fits into it. I'll look after my morning coffee.
Last edited by Malice; 05/31/13 16:41.
|
|
|
Re: LBGUI - RELEASE
[Re: 82RJZAE]
#423532
05/31/13 19:02
05/31/13 19:02
|
Malice
Unregistered
|
Malice
Unregistered
|
Have you tried breaking the string into many TEXT object and positioning them and assign all of them as children in the lbg window? Unless there is some limit to the number of lbg_text per lbg_window. I believe this is how Lukas did it in demo.c Is it possible to have a TEXT string behind the actual level? Level like in the rendered wmb ? So rendering a string on the sky/background texture? Then the window does not need to clip the strings and I can simply bind the text to the background. Like rendering to target.bmap of the windows->content_panel ? Sort of the idea last post here post about text on texture Like maybe with bmap_blit. Or not using lbgui and making a acknex panel->window and placing the TEXT object behind it off full size and then scrolling by changing the TEXT objects pos_y ? Really bad solution - make a full screen bmap with a alpha window for where the lgb_window is on screen. Make the lbg_window content set to transparent background. Place Text* object behind screen bmap and lbg_window and scroll by changing text object pos_y. vscrollbar can be use if you find the var that actually changes the pos of things in lbg_windows. (will lo0k)
Last edited by Malice; 05/31/13 19:34.
|
|
|
Re: LBGUI - RELEASE
[Re: ]
#423534
05/31/13 19:30
05/31/13 19:30
|
Joined: Jul 2008
Posts: 168
82RJZAE
Member
|
Member
Joined: Jul 2008
Posts: 168
|
Have you tried breaking the string into many TEXT object and positioning the and assign all as children in the lbg window? Unless there is some limit to the number of lbg_text per lbg_window. I believe this is how Lukas did it in demo.c Yea, since the strings are modified at runtime (the user can enter in text into an editbox which gets added to a log), I tried creating TEXT* on runtime using txt_create. But as I mentioned earlier, it creates them in several seconds and locks up the entire game. I cannot create TEXT* statically since I do not know how much text will be entered into the editboxes. Or not using lbgui and making a acknex panel->window and placing the TEXT object behind it off full size and then scrolling by changing the TEXT objects pos_y ? Yes, I suppose I meant something like this method. So I can make the LBG_window have no content then use the scrolling to change the pos_y of the TEXT*. But how do I get the TEXT* to be clipped once it's past the LBG_window frames?
|
|
|
Re: LBGUI - RELEASE
[Re: 82RJZAE]
#423540
05/31/13 19:51
05/31/13 19:51
|
Malice
Unregistered
|
Malice
Unregistered
|
So I can make the LBG_window have no content then use the scrolling to change the pos_y of the TEXT*. But how do I get the TEXT* to be clipped once it's past the LBG_window frames? To clip it - ? Hum.. Did you read Really bad solution? The text is behind the lbg_window which is behind the screen bmap. sceen bmap is colored screen color anything not in the alpha window is invisible. What is wrong with a simple string swapping method ? People were doing long before lbgui. AUM scrolling text Maybe a way with bmap font and bmap manipulation to blit text on to the a panel that's the child of a LBG_window. But you have to keep changing the panels size to fit new text. A scrolling text that the player adds new content to and has to be able to back scroll fast? Like looking back in a chat log? Any reason you can't limit the look back range to say 20 post?
Last edited by Malice; 05/31/13 20:01.
|
|
|
Re: LBGUI - RELEASE
[Re: ]
#423550
05/31/13 21:07
05/31/13 21:07
|
Malice
Unregistered
|
Malice
Unregistered
|
Have you looked at the TEXT* object in the manual? I just found 'offset_y' this is new to me.
This is getting Off topic of Thread
Last edited by Malice; 05/31/13 21:24.
|
|
|
Re: LBGUI - RELEASE
[Re: 82RJZAE]
#432174
11/01/13 20:44
11/01/13 20:44
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
Senior Member
|
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
Problem with WINDOW vertical scroolBar and ComboBoxes in(caption) and (button). I tried to fix, but I'm not having success in my attempts. The problem is the following:. > I have a WINDOWS that contains some components. > In this window I have a Vertical ScrollBar. Whenever I use the scrolling window, the components are usually hidden, With the exception of the caption and button of the combobox! See picture for sample; WINDOW with components: Scrroling window If someone could correct this problem, please notify me. This problem is not just with the components combobox. EDITBOX->caption Too. I do not veriquei with LISTBOX.
Last edited by NeoNeper; 11/01/13 20:47.
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
Re: LBGUI - RELEASE
[Re: Ch40zzC0d3r]
#432178
11/01/13 21:04
11/01/13 21:04
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
Senior Member
|
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
It would be wonderful to use in LITEC Gwen. But it exists?
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
Re: LBGUI - RELEASE
[Re: Ch40zzC0d3r]
#432180
11/01/13 21:24
11/01/13 21:24
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
Senior Member
|
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
Wooow but this is incredible. You provided somewhere for us to use or is commercial?
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
Re: LBGUI - RELEASE
[Re: NeoNeper]
#432181
11/01/13 21:30
11/01/13 21:30
|
Joined: Oct 2011
Posts: 1,082 Germany
Ch40zzC0d3r
Serious User
|
Serious User
Joined: Oct 2011
Posts: 1,082
Germany
|
I could upload it, but I have to fix much on the names and on the using then. Its a engine plugin dll, sou you nee dto have com or above to use it If more people are interested I could fix it up and upload some codenz EDIT: Could also attach my Anti-Cheat System xD
Last edited by Ch40zzC0d3r; 11/01/13 21:31.
|
|
|
Re: LBGUI - RELEASE
[Re: Ch40zzC0d3r]
#432182
11/01/13 21:36
11/01/13 21:36
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
Senior Member
|
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
I really am interested. Unfortunately I'm with many financial problems and would not be able to help you financially, but if I can help you in any way in the finalization of this plugin, I would be very happy to help. Long time wait for a GUI in real 3DGS. I have much interest in it, I believe we all !
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
Re: LBGUI - RELEASE
[Re: NeoNeper]
#432183
11/01/13 21:38
11/01/13 21:38
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
Senior Member
|
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
Problem with WINDOW vertical scroolBar and ComboBoxes in(caption) and (button). I tried to fix, but I'm not having success in my attempts. The problem is the following:. > I have a WINDOWS that contains some components. > In this window I have a Vertical ScrollBar. Whenever I use the scrolling window, the components are usually hidden, With the exception of the caption and button of the combobox! See picture for sample; WINDOW with components: Scrroling window If someone could correct this problem, please notify me. This problem is not just with the components combobox. EDITBOX->caption Too. I do not veriquei with LISTBOX. Meanwhile, the LUCAS can lend a hand to fix the bugs mentioned above? I also would be very grateful
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
Re: LBGUI - RELEASE
[Re: NeoNeper]
#432184
11/01/13 21:54
11/01/13 21:54
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
Senior Member
|
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
keep me informed about your GUI Ch40zzC0d3r
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
Re: LBGUI - RELEASE
[Re: rojart]
#432396
11/05/13 20:41
11/05/13 20:41
|
Malice
Unregistered
|
Malice
Unregistered
|
@Ch40zzC0d3r - Very much interested, packaged UI takes a of work off me.
|
|
|
Re: LBGUI - RELEASE
[Re: Kartoffel]
#432400
11/05/13 20:54
11/05/13 20:54
|
Malice
Unregistered
|
Malice
Unregistered
|
Awesome Thank you.
|
|
|
Re: LBGUI - RELEASE
[Re: alibaba]
#451368
05/04/15 20:00
05/04/15 20:00
|
Joined: May 2007
Posts: 2,043 Germany
Lukas
OP
Programmer
|
OP
Programmer
Joined: May 2007
Posts: 2,043
Germany
|
Hello. I guess now that other people are fixing bugs in LBGUI, I should talk about the state of the official update. I don't consider the project dead, even though it has been a while since I worked on it and I know it has been a long time since I announced it first. Since I started my Physics study I have had little time to work on LBGUI, pretty much only in the holidays after the last exam each semester, and it takes a while each time to get back into it after not looking into the code for so long. Actually, it's mostly finished and I had already started updating the manual so I could release it. But then I found new bugs that are so severe that releasing this version before fixing them was out of the question. So I only have to fix these bugs. Maybe I'll even be able to finally release LBGUI 1.1 in this year (but I'm not promising anything). I guess what I can give you now is the manual pages about the new features and the bugfixes I implemented: https://drive.google.com/file/d/0B8eheNsaIoF9c0ZqME5IcXNyOUE/view?usp=sharingIf you found a bug that is not listed there, I encourage you to post it here. If you already told me or posted it in the past and it's not on the list I probably didn't properly note it in my todo-list, so please post it again in that case. alibaba: Could you tell me where you edited the code and what of what nature the memory leaks were? It's possible that it's the memory leak I already fixed, but if not I'd like to implement these fixes in which case I'd credit you of course. About the long-term future of LBGUI: In hindsight, I don't like many aspects of how LBGUI works internally (which make it slower than it needs to be), so LBGUI 1.1 will be the last update in a while and the last that tries to be as backwards-compatible as possible. If there will ever be an LBGUI 2.0, it will be different in many ways and code using LBGUI 1.0 will not necessarily work with it anymore.
|
|
|
Re: LBGUI - RELEASE
[Re: alibaba]
#451472
05/06/15 22:35
05/06/15 22:35
|
Joined: Jun 2001
Posts: 1,004 Dossenbach
nfs42
Serious User
|
Serious User
Joined: Jun 2001
Posts: 1,004
Dossenbach
|
@alibaba: it seems you got them (leaks) @Lukas: nice to see you workiung (again) on your contribution
Andreas GSTools - Home of GSTScript 0.9.8: lua scripting for A6/7/8 GSTNet 0.7.9.20: network plugin for A6/7/8 GSTsqlite 1.3.7: sql database plugin for A6/7/8 3DGS Codebase: 57 snippets || 3DGS Downloads: 248 files
|
|
|
Re: LBGUI - RELEASE
[Re: MasterQ32]
#466056
05/23/17 08:19
05/23/17 08:19
|
Joined: Dec 2010
Posts: 224 NRW, Germany
NeoJones
Member
|
Member
Joined: Dec 2010
Posts: 224
NRW, Germany
|
Great work Lucas! Does someone have a last updated version of this or a functional link to it? Or is there a newer gui?
Errors are the engine of progress.
Version: A8 Commercial OS: Win 7 64bit Models: Cinema 4D
|
|
|
|