Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / Another simple GUI

Author
Message
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 6th Mar 2010 05:12
It's simple, but I can't think of any kind of menu you can't do with it. It's not hard to modify if you need to.

The fastest code is the code never written.

Attachments

Login to view attachments
seppgirty
FPSC Developer
15
Years of Service
User Offline
Joined: 3rd Jul 2009
Location: pittsburgh, pa.
Posted: 7th Mar 2010 07:50
hey man, cool.... thanks

gamer, lover, filmmaker
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 7th Mar 2010 15:11 Edited at: 7th Mar 2010 18:25
Thanks for your comment. I've made some minor adjustments and will post an update soon.

EDIT:
I am waiting on some problem-solving stuff on DBP board, and then I will post an update (hopefully the last one).

The fastest code is the code never written.
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 8th Mar 2010 00:10
Still don't have a fix for the mouse position problem. It's documented in the source code.

Here is the most up to date version:
Mouse-over response added
Text input cursor indicator added
More examples of capabilities

The fastest code is the code never written.

Attachments

Login to view attachments
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 14th Mar 2010 14:41
just a tip : more screenshots = more comments / users

Zeus
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 14th Mar 2010 18:27
I am not commenting until I see screens. Mwahahahaha!

Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 18th Mar 2010 15:12 Edited at: 19th Mar 2010 01:03
Screenshots of a menu utility???? IT'S A MENU UTILITY! It would be better for me to post the functions with notes on what they do than a screen shot..... I could give screenshots, but it wouldn't give you as much info as the functions would..... But, to appease the voyers, I'll shoot one when I get home.

The fastest code is the code never written.
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 19th Mar 2010 01:02 Edited at: 19th Mar 2010 01:02
Screenshots of a menu utility???? IT'S A MENU UTILITY! It would be better for me to post the functions with notes on what they do than a screen shot..... I could give screenshots, but it wouldn't give you as much info as the functions would..... But, to appease the voyers, I'll shoot one when I get home.


HERE'S YOUR SCREENSHOT:

The fastest code is the code never written.

Attachments

Login to view attachments
Link102
19
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 19th Mar 2010 15:24
click

could you make a screen shot where we can see the buttons and menu items clearly?

Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 19th Mar 2010 15:46
You can get the best picture by running the program and seeing for yourself.

The fastest code is the code never written.
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 26th Mar 2010 04:33
Here's the latest update.
Backspace problem fixed.

The fastest code is the code never written.

Attachments

Login to view attachments
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 26th Mar 2010 04:34 Edited at: 26th Mar 2010 04:36
And for Link102, here's a pretty screenshot:

This may make you happy.

The fastest code is the code never written.

Attachments

Login to view attachments
Alfa x
18
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 30th Mar 2010 21:42 Edited at: 31st Mar 2010 04:55
Hawk, can this be used for commercial purposes?

[Edit] I found a bug. When you press the click button moving the bar of the list box, if you don't move the mouse the bar continues moving alone. [/Edit]
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 31st Mar 2010 22:16
There is a problem with the mouse location when in windowed mode. Try it in full screen and see if that happens.

The fastest code is the code never written.
Alfa x
18
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 1st Apr 2010 18:32 Edited at: 1st Apr 2010 18:33
Hi,
I have documented and organized your code a bit.

I have upload the last version.

Attachments

Login to view attachments
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 1st Apr 2010 19:52
Are you sure you uploaded the right one? It looks the same as mine.

The fastest code is the code never written.
Alfa x
18
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 1st Apr 2010 20:21 Edited at: 1st Apr 2010 20:35
yes check the remarks

Rem --------------------------------------------------------------
Rem Change the color property of all menu items

I'm working atm in a new function :

clearEntryFromMenuItem

Will upload the code later.

[Edit] Uploaded the updated version with the new function [/Edit]

Attachments

Login to view attachments
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 2nd Apr 2010 15:43
Thanks for the help.

The fastest code is the code never written.
Alfa x
18
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 5th Apr 2010 15:26 Edited at: 5th Apr 2010 15:27
Hi,
I made a last version and found a bug.

In this version you can create a button that is the size you desire (Style = -1), plus I embedded some things in Init to encapsulate more the utility.

Plus, I found a bug.
When you hide a group that has a button to hide itself, it don't process all the events (because you process only shown groups events) so the button keep pressed all the time.

I think that the event processing has to be enhanced to add process states of Menu Items in the GetMenuItemState function, so they can return to normal after trigged and before something else happens.

I attach the last version.

Cheers.

Attachments

Login to view attachments
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 6th Apr 2010 00:06
Quote: "When you hide a group that has a button to hide itself, it don't process all the events "

The purpose of hiding a group is so that you can have groups that you are not using or showing. The states of the buttons should remain the same while hidden-- that's the reason you can't change them.

It's not a bug; it's a "special feature".

The fastest code is the code never written.
Alfa x
18
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 6th Apr 2010 20:57
Hawk.
thats not what i'm trying to say. I know that hidden groups aren't processed.
I will try to explain myself better.

when you press a button that hides a group it is on, it hides the group. But the button preserver its pressed state (and not become available to press again), because it hidden groups dont get processed until they are visible, and because the event is not prcessed, the button state is not set back to 0 (its a press and release button.)

Because it is pressed as you were doing a click when you activate the group it becomes immediately hidden, because the button keeps "pressed", because the button state never came back to normal.

More long explanation. I hope its better .
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 7th Apr 2010 16:31
You can always manually change the state of any menuitem. And why would you want to put a menuitem to hide a group in that same group??? BTW, the hidegroup() proceedure is not something done by the utility, it's just a function that can be used anywhere. You don't have to have a menuitem associated with that.

Simply put, don't try to hide a group using a menuitem attached to that group. The hidemenu() is used to make a group unuasable and invisible to the user until it is needed and then you simply show it and it becomes usable again..... I hope that explains it.

The fastest code is the code never written.
Alfa x
18
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 7th Apr 2010 18:21
Quote: "And why would you want to put a menuitem to hide a group in that same group??? "


Because Im making a group to represent a screen, like

main menu - one group.
Versus Screen - another group.
Story - another group.

When I press in the Main menu the versus menu, the main menu group is hidden and the versus menu group is shown. But the button that hides the Main Menu, is in the Main Menu. The vs button.

Quote: "Simply put, don't try to hide a group using a menuitem attached to that group. The hidemenu() is used to make a group unuasable and invisible to the user until it is needed and then you simply show it and it becomes usable again..... I hope that explains it."


I can do something to fix that at night. I will post the code. Because in my case I need to do something like that

Cheers.
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 8th Apr 2010 17:34
Ok. Say you want to go from main menu to another and then back to the main menu, you have a button on the main menu that causes the main menu to be hidden and shows the next menu. Then when you want to go back, simply have the button that goes back to the main menu to hide the current menu and show the main menu -- you also need to reset the state of the original main menu button that caused the "hide" to occur. Be sure in the main menu to reset the "next" menus buttons to unchecked/up. Simple as that. The controls built in to the menu utility are not completely automatic by design.... This allows for more flexibility.

The fastest code is the code never written.
Alfa x
18
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 8th Apr 2010 19:59 Edited at: 11th Apr 2010 14:51
Ok, I understand.
I will add that only for standard push buttons, since they ever go back to the original state. If i have the time I will try a new button that keeps pressed until you press again (With two different images for both states).

I was not able to finish yesterday, because I was very busy trying to DarkNet my application with Menu Utility. I added a pair of functions to Menu Utility, that I want to share with you and the community. Im sure this night im going to finish (No too sure now ).
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 9th Apr 2010 15:24
Quote: "If i have the time I will try a new button that keeps pressed until you press again (With two different images for both states). "

I've already done that; it's the toggle (style 1). Though it doesn't change the image, it does change color to a darker blue. Once again, I wanted to make it simple and small.

The fastest code is the code never written.
Alfa x
18
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 12th Apr 2010 01:50
HI!!!.
I have been very busy and I have been unable to finish my application. But did various things to Menu Utility that want to share.


- The simple button didn't come back automatically. Now does.
- The list were allowing to select non existent entries. Now only added entries items are valid to select.

Added the following functions:

GetEntryFromMenuItem() Gets the current selected item from a menu item as a string.

GetMenuItemCaption(). ALlows to get the caption from a Menu Item. Useful for text Boxes.

Attachments

Login to view attachments
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 12th Apr 2010 16:48
Thanks for your inputs/updates. I appreciate that some people will help out on this forrum. The more brains involved, the better a project becomes.... Until it becomes so complicated that it's use is overwelmed by it's sheer size.

I only ask that anyone adding to this utility keep in mind that I want it to be simple and small.

The fastest code is the code never written.

Login to post a reply

Server time is: 2024-07-27 08:32:16
Your offset time is: 2024-07-27 08:32:16