Win32 File Menu?
Blitz3D Forums/Blitz3D Beginners Area/Win32 File Menu?
| ||
Hi all. I've been searching the forums, and can't find an example of how to make a File Menu bar + Status menu bar using ONLY User32.decls commands. Can someone please either show me an example or point me to an example of this? I do NOT wanna use WinBlitz3D or any other GUI plugins, those are too hard to implement, and are not what I would like to learn. Thundros~ Last edited 2012 |
| ||
If WinBlitz3D is too hard for you, then you have zero chance of achieving this without it. WinBlitz3D is not hard. You can probably just copy/paste the necessary code out of the included examples. |
| ||
Use BlitzPlus ^^ (free for a limited time) http://www.blitzbasic.com/Products/_index_.php write your own lib, or I've written a menu bar-lib a few months ago which is very simple to implement. Only 7 functions to create, update and check the state of the menu bar. The only thing is that I haven't implement radio items or check able items yet. Hope I could help you ;) |
| ||
Thanks, Addi! :) I'm looking to create a simple menu with submenus and seperator (spacer). Your lib would be PERFECT if that's ok, may I have permission to use it in commercial project as long as the source code is compiled? :) |
| ||
First have a look at it :D ;) If you want to use it you can use and modify it like you want ;) Seperators are'nt implemented yet but if you really want to use the lib there is no problem for me to do it ;) If you have any problems or the color is'nt yours, ask me Download: https://dl.dropbox.com/u/48089972/blitzmenubar%20by%20addi.bb |
| ||
O I DEFINITELY like! :D Although you had a SMALL glitch with it which I think I fixed for you :) You were using a static width for the grey box when you should have been using GraphicsWidth() and GraphicsWidth()-2 so it works in EVERY resolution mode :D Yes, I would DEFINITELY like to use this! :D And if you could add the seperator, and a way to change the colors manually, that would be GREAT! :D Also, just so you know, the text menus are a bit too close to each other File|View should be: File | View :) Here's the fix: Thanks! :) Last edited 2012 |
| ||
Tomorrow Im going to work on on this ;) I make it more flexible I will tell you if i am finish but I think it would not take much time Thanks for the fix :3 =) Last edited 2012 |
| ||
No problem! :) I will LOVE to hear from you tomorrow! :D |
| ||
@ADdi I have two programs in my life Blitz3D payments and BlitzPlus ;( Last edited 2012 |
| ||
I love Blitz3D! :) |
| ||
Me too <3 :D Ok here is the update: https://dl.dropbox.com/u/48089972/blitzmenubar%20by%20addi.bb If you have any problems or something is missing ask me again ;) I've added 4 more functions to color the menu and I've modified the CreateSubMenu-function so that you are able to create a seperator Just look at the example an change the values ;) |
| ||
This is amazing! :D Although, can this be done WITHOUT the functions, "Object()", and "Handle()"? That would make it easier for me to understand! =D Also, when mouse is outside of window BEFORE program starts OR you click outside of the window, it automatically highlights the "File" menu Thanks! :D Last edited 2012 |
| ||
Without Handle() I don't think so because you need this function to get the ID of the Type-object which is used for looking which submenu goes with which menu etc. The Object function is used to jump to the parent type object to set its SubMenuWidth :D which is used for the width of the rects for the submenu entries |
| ||
Can we at least do it without Object() ? :) |
| ||
Use this version at first ;) I gonna rewrite it a bit so that the code is a bit easier to understand but this may take a few days ;) :D |
| ||
Found glitch. Select a menu, then mouse over another menu |
| ||
You mean that twice are selected? |
| ||
Yes |
| ||
Not a glitch ;) One is selected the second one is marked because the mouse is over |
| ||
Ah, ok :P |
| ||
Sorry for the double post. I was having PC problems yesterday again >< Last edited 2012 |
| ||
Hows the menu going?! :D |
| ||
maybe tomorrow ;) |
| ||
Hooray! =D |
| ||
Hmm okay I really tried to make it as easy as I can but the thing is that the code is really simple :D so there wasn't many to rewrite. The drawing method is the same (have to use hexadecimal color codes in order to use as few variables as possible) but I've replaced the Object()- function with a more understandable "trick", I removed the "glitch" you was talking about some posts above and I've written a bit more comments (hope you're able to understand them :D). Download: https://dl.dropbox.com/u/48089972/blitzmenubar%20by%20addi.bb If you find any glitches or bugs or whatever tell me ;) |
| ||
This is awesome! :D So far, no glitches =D |
| ||
Can we try to make the menu out of quads (meshes) instead of using text? =D |
| ||
3D or just simple faces? Last edited 2012 |
| ||
Simple planes aka quads. 4 sided, 3d rectangles =D Using CreateTexture for the text images, and EntityTexture for the quads to slap the texture onto the invisible quads =D Last edited 2012 |
| ||
Could try it |
| ||
HOORAY! =D Can't wait to test it! =D |
| ||
How's it going, Addi? =D |
| ||
Need bit more time I need a formula that calculats the the x and the y position of the submenus / menus in dependens of the distance between camera and mesh. If I have one there won't be any problems more (just a few little one;)) |
| ||
Ok, cool! =D |
| ||
How's it going?! =D |
| ||
+done *menus added *menubar added -working on submenus +coming *bug fix (height of the menubar etc is not fixed) *textures (hmmmm hope it works like i want) *clickable menu |
| ||
HOORAY! =D Can you post it up?! =D |
| ||
not finisched this was the to do list :D I am working on the submenus and then I have to make it clickable ;) I try to work as fast as I can ;) |
| ||
YAY! =D |
| ||
How's it going? =D |
| ||
Big problems with the texture. I think, that I will fail at this point ;( ;(. Maybe you have the knowlege to do it. Tomorrow I will upload that what I will have finished. |
| ||
Try harder! :) I KNOW u can do it! :) |
| ||
How's it comin' along? U still havin' trouble? :) |
| ||
Sorry have a lot to do ;( . I also thing that my 3D version is rubbish: you're not abled to rotate the camera, the height is variable ... There is a Lib called Draw3D which gives one the abillity to draw pictures by using 3D, but I don't know if you can use it for a commerciell project and also I have no experience with it. May I finish today if not Wendsday. |
| ||
That's really not good enough. You must work harder! :P |
| ||
Ross, hijack ur own thread. Ur not welcome here. |
| ||
How's it goin', Addi? :) |
| ||
Jesus, leave the man alone. |
| ||
Or how about u leave ME alone? :< Go away, ur not welcome here! :< |
| ||
Or how about u leave ME alone? :< Go away, ur not welcome here! :< LineOf7s? +1! BlitzPlus is actually very good. Last edited 2012 |
| ||
Yea, if only BlitzPlus had 3D >< |