Win32 File Menu?

Blitz3D Forums/Blitz3D Beginners Area/Win32 File Menu?

Guy Fawkes(Posted 2012) [#1]
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


Yasha(Posted 2012) [#2]
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.


Addi(Posted 2012) [#3]
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 ;)


Guy Fawkes(Posted 2012) [#4]
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? :)


Addi(Posted 2012) [#5]
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


Guy Fawkes(Posted 2012) [#6]
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


Addi(Posted 2012) [#7]
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


Guy Fawkes(Posted 2012) [#8]
No problem! :)

I will LOVE to hear from you tomorrow! :D


Yue(Posted 2012) [#9]
@ADdi
I have two programs in my life Blitz3D payments and BlitzPlus ;(

Last edited 2012


Guy Fawkes(Posted 2012) [#10]
I love Blitz3D! :)


Addi(Posted 2012) [#11]
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 ;)


Guy Fawkes(Posted 2012) [#12]
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


Addi(Posted 2012) [#13]
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


Guy Fawkes(Posted 2012) [#14]
Can we at least do it without Object() ? :)


Addi(Posted 2012) [#15]
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


Guy Fawkes(Posted 2012) [#16]
Found glitch.

Select a menu, then mouse over another menu


Addi(Posted 2012) [#17]
You mean that twice are selected?


Guy Fawkes(Posted 2012) [#18]
Yes


Addi(Posted 2012) [#19]
Not a glitch ;)
One is selected the second one is marked because the mouse is over


Guy Fawkes(Posted 2012) [#20]
Ah, ok :P


Guy Fawkes(Posted 2012) [#21]
Sorry for the double post. I was having PC problems yesterday again ><

Last edited 2012


Guy Fawkes(Posted 2012) [#22]
Hows the menu going?! :D


Addi(Posted 2012) [#23]
maybe tomorrow ;)


Guy Fawkes(Posted 2012) [#24]
Hooray! =D


Addi(Posted 2012) [#25]
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 ;)


Guy Fawkes(Posted 2012) [#26]
This is awesome! :D So far, no glitches =D


Guy Fawkes(Posted 2012) [#27]
Can we try to make the menu out of quads (meshes) instead of using text? =D


Addi(Posted 2012) [#28]
3D or just simple faces?

Last edited 2012


Guy Fawkes(Posted 2012) [#29]
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


Addi(Posted 2012) [#30]
Could try it


Guy Fawkes(Posted 2012) [#31]
HOORAY! =D Can't wait to test it! =D


Guy Fawkes(Posted 2012) [#32]
How's it going, Addi? =D


Addi(Posted 2012) [#33]
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;))


Guy Fawkes(Posted 2012) [#34]
Ok, cool! =D


Guy Fawkes(Posted 2012) [#35]
How's it going?! =D


Addi(Posted 2012) [#36]
+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


Guy Fawkes(Posted 2012) [#37]
HOORAY! =D

Can you post it up?! =D


Addi(Posted 2012) [#38]
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 ;)


Guy Fawkes(Posted 2012) [#39]
YAY! =D


Guy Fawkes(Posted 2012) [#40]
How's it going? =D


Addi(Posted 2012) [#41]
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.


Guy Fawkes(Posted 2012) [#42]
Try harder! :) I KNOW u can do it! :)


Guy Fawkes(Posted 2012) [#43]
How's it comin' along? U still havin' trouble? :)


Addi(Posted 2012) [#44]
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.


Ross C(Posted 2012) [#45]
That's really not good enough. You must work harder! :P


Guy Fawkes(Posted 2012) [#46]
Ross, hijack ur own thread. Ur not welcome here.


Guy Fawkes(Posted 2012) [#47]
How's it goin', Addi? :)


LineOf7s(Posted 2012) [#48]
Jesus, leave the man alone.


Guy Fawkes(Posted 2012) [#49]
Or how about u leave ME alone? :< Go away, ur not welcome here! :<


Captain Wicker (crazy hillbilly)(Posted 2012) [#50]
Or how about u leave ME alone? :< Go away, ur not welcome here! :<


LineOf7s? +1!
BlitzPlus is actually very good.

Last edited 2012


Guy Fawkes(Posted 2012) [#51]
Yea, if only BlitzPlus had 3D ><