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.

Work in Progress / FUI- Framed User Interface

Author
Message
MonoCoder
18
Years of Service
User Offline
Joined: 4th Dec 2005
Location: england
Posted: 30th Oct 2007 02:06 Edited at: 30th Oct 2007 02:26

FUI - Framed User Interface
...has no superfluous logo yet to speak of


First and foremost, FUI is a User Interface- a basic bits and buttons environment, useful for sneering at your past attempts to rig every button seperately in your editor, and let's face it, most of us probably did. But of course, there's already a thousand UI's under the sun, and a thousand more yet to come. The horror! But this UI boasts super mega-advanced watsits I inventively entitled "Frames" - Basically, a window-esque inlet in which you can put stuff. What good's that? Well, first, it provides you with a way to make your own customized listboxes and such with a bit of manipulatory-jiggery, and second, it opens up all the sorts of opportunities you can have from having setups like this: a general entity (ie. button, or an almighty imagebutton if you're feeling fanciful) inside a frame, inside a frame, inside a frame, and so on and so forth. I imagine it would be possible to do something outrageous like have a 2D map scrollable in a frame, then have another frame appear within to aid you in editing your tiles or what-have-you. Whatever, that's a mediocre example because I'm tired. I'm sure you'll like it anyway.

Entities: In other words, stuff. Buttons and boxes and sliders and things. Here's a list of what FUI currently features:
Button - standard button with text in it.
Imagebutton - button that's actually a picture. When mere words will not suffice.
Label - box of text you can't edit directly.
Textbox - box of text you can edit directly (well, soon).
Checkbox - Goes on, goes off.
RadioCheckBox - Groups of these can have one or none checked.
RadioButton - Groups of these can have one checked.
Slider - Comes in horizontal and vertical flavours. Slide a value in a given range.
Frame - Like a window.

Moving Picture time! Bash your head against this link to see a video. Everything's more or less self explanatory. The textbox near the bottom right displays some time-stats. The 3-sliders-in-a-box slapped in the middle of the screen is actually 3-sliders-in-a-frame (Notice how the guidelines for the sliders extend beyond what you see). Of course, this video doesn't include any fancy stuff like frames in frames, and is thus effectively useless. Hope you like it all the same.

By the way, that example runs at a more-or-less consistent 145fps on my system (that's with all the text running down the left being printed using standard dbp text).


Throw some verbal abuse at me!

EBA; FUI; Mario Land Ripoff.
Every time you post a joke in the form of code, mace yourself.
Balid
20
Years of Service
User Offline
Joined: 21st Nov 2003
Location: MI, USA
Posted: 30th Oct 2007 02:29
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 30th Oct 2007 02:42
Looks very cool. I never thought about making the mouse lock onto nearby gadgets, otherwise I would have made alot more progress with mine, but nevermind. Good work

"It's like floating a boat on a liquid that I don't know, but I'm quite happy to drink it if I'm thirsty enough" - Me being a good programmer but sucking at computers
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 30th Oct 2007 10:18 Edited at: 30th Oct 2007 10:19
Ooh... Competition...
Does this support overlapping frames? Can entities have zdepths to control when they render? Does it have a dynamic event system on a per entity basis?

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 30th Oct 2007 11:00
Ah the competition is getting tought now. This should be interesting to watch

"It's like floating a boat on a liquid that I don't know, but I'm quite happy to drink it if I'm thirsty enough" - Me being a good programmer but sucking at computers
zapakitul
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: In my world
Posted: 30th Oct 2007 12:16
wow love the vid

MonoCoder
18
Years of Service
User Offline
Joined: 4th Dec 2005
Location: england
Posted: 31st Oct 2007 01:40 Edited at: 31st Oct 2007 09:40
Thanks for the comments.

@Zotoaster:
Lock? Well, the mouse reveals stats about things when you hover over them, but beyond that there's no mouse-locking. Unless you're referring to the way it makes an entity "active" when clicked and deactivates it on release...?

@Digg:
Quote: "Does this support overlapping frames?"

You can put a frame atop another, as well as inside.

Quote: "Can entities have zdepths to control when they render?"

Yes and no. At the moment, everything's drawn in a fixed order (sorted partly by the order entities are made in, and partly by where entities are in relation to frames). There will be (but currently there isn't) a set of commands that allow you to send to back/move back/move forward/bring to front. In time I may bring in some more direct number-fiddlery for more advanced shifting.

Quote: "Does it have a dynamic event system on a per entity basis?"

...eh?
edit: oh, you mean the ability to script events for entities? Well, not as such (my intention was for the user to simply hardcode these kinds of things). If the demand is grand though, I'll look into making an editor in which you can write entity-specific scripts.

Shall we call this a future feature hope?



I'll update when changes are plentiful and the moon is fat.

EBA; FUI; Mario Land Ripoff.
Every time you post a joke in the form of code, mace yourself.
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 31st Oct 2007 11:07
@MonoCoder
By dynamic event system, I mean using IanM's function pointer plugin to be able to add and remove event handlers from events at runtime. Also, does it support skinning of gadgets? And is there a way to draw on gadgets and have it appear at the correct zdepth
I'm impressed that they can overlap

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 31st Oct 2007 13:14
MonoCoder,

When I mean the mouse locks I didn't mean it literarly, but watching the video, there seems to be a few lines representing the mouse's positions which seem to 'stick' to nearby objects.

I always had a problem with my GUIs with dragging windows, because of the mouse movements, but if I was to rewrite it using this method I would have saved myself alot of trouble

"It's like floating a boat on a liquid that I don't know, but I'm quite happy to drink it if I'm thirsty enough" - Me being a good programmer but sucking at computers
MonoCoder
18
Years of Service
User Offline
Joined: 4th Dec 2005
Location: england
Posted: 31st Oct 2007 20:25 Edited at: 31st Oct 2007 20:29
Quote: "I'm impressed that they can overlap"

Hmm, have I misconstrued this somewhat? You do mean simply being able to put one frame (plus whatever's inside) over another frame? (It's just, you seem impressed so I don't want to "get it" later, find I'm wrong, and disappoint!)

Quote: "By dynamic event system, I mean using IanM's function pointer plugin to be able to add and remove event handlers from events at runtime."

I haven't actually used any of IanM's plugins here (or ever... I know, I know). Could you elaborate a little further, I'm a little slow tonight.

Quote: "And is there a way to draw on gadgets and have it appear at the correct zdepth"

Like with a pen? Or insert a picture and slip it into a frame? If the former, no, but I could make a little something further down the line for it if you want. If the latter, it's very possible, but you can almost sort-of do it at the moment with image-buttons.

@Zotoaster:
Actually, those lines are just a little debug thing that show the position/dimensions of the entity beneath. In the case of sliders (ala dragging), the workings of it go a bit like this:



That's it in a nutshell. But yeah, those lines coupled with the contextual data in the top left have been pretty useful for sorting stuff out thus far.

EBA; FUI; Mario Land Ripoff.
Every time you post a joke in the form of code, mace yourself.
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 1st Nov 2007 00:15
@MonoCoder
That was right Most GUIs have no depth sorting (like fresh GUI for example) so when two windows/frames overlap it gets all messed up with some gadgets going behind, and some going in front!
IanM's plugin, amongst other things, allows you to call a function with its pointer, and allows you to get the pointer of a function. The event system in my GUI basically holds these function pointers, and when a particular event happens, and the function pointer is not 0, it calls the pointer associated with that event. A good use for this is with the 'painted' event, which happens as soon as a particular gadget has been drawn, so you can draw more stuff that is not supported by the engine natively. BTW sorry for that stuff earlier, I was just in a showy offy mood

MonoCoder
18
Years of Service
User Offline
Joined: 4th Dec 2005
Location: england
Posted: 1st Nov 2007 01:44 Edited at: 1st Nov 2007 01:47
No problem.

So in regards to this pointer/event stuff: What you're saying is that once a gadget/entity/spatula has been drawn, it triggers the "painted" event, which then- calls a separate function? ...Or something. And the pointers themselves, I'm still all at sea about how they make things easier.

Could you expand further yet on this?
(sorry, it's just that your system and what-have-you's all a bit unknown to me, and I've fallen in at the deep end).


Thanks.

EBA; FUI; Mario Land Ripoff.
Every time you post a joke in the form of code, mace yourself.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 1st Nov 2007 03:08
Diggsey is refering to the callback system, which many GUIs use, including Windows' GUI. In this system when an event occurs, it will call the callback. In Win32 this is implemented through a simple function which takes the GUI Element (Window) with which the callback occured, the reason the callback was occured (called the message), and 2 extra parameters, the WPARAM and LPARAM, which describe more about the callback. Get it?


Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 1st Nov 2007 11:02
@MonoCoder
Without the function pointers, the user would have to go through and hardwire all the types of event to their functions that handle them. With function pointers, they can just call 'SetWindowEvent(hwnd, eventID, pointer)' and from then on, the function pointer they used will be called when that event is raised for that window

MonoCoder
18
Years of Service
User Offline
Joined: 4th Dec 2005
Location: england
Posted: 2nd Nov 2007 02:25 Edited at: 2nd Nov 2007 02:26
Ok, this is my grand interpretation:

Events are specified with a pointer.
Events are raised in the same manner as calling a function.
The raiseevent function then calls the function neccessary for the event if it exists.

So:

setevent( entity, offset for event, function pointer )
raiseevent( entity, offset for event, some data, more data )

where offset for event is (painting offset) and function pointer is a pointer which binds that event to a function.


Am I close or far?
(sorry about this)

EBA; FUI; Mario Land Ripoff.
Every time you post a joke in the form of code, mace yourself.
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 2nd Nov 2007 04:03
release a beta!

This isn't a sig. It's me disguised a sig. Can you get me out?
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 2nd Nov 2007 11:27
@MonoCoder
I think you've got it

MonoCoder
18
Years of Service
User Offline
Joined: 4th Dec 2005
Location: england
Posted: 3rd Nov 2007 02:34 Edited at: 4th Nov 2007 02:14
Alas, one last affirmation. After flicking through some threads and the source of your ViewGUI (which has helped loads, by the way, thanks), I think I've finally gotten my head round stuff. This is what I've come out with:



In a nutshell, the program gets the pointer of a couple of functions, sets up an array of squares, allocates memory for them, sets the draw event to point to the drawbox function, and then raises it to draw each box (they also change when you hover over them).

EDIT: Whey, some events. This tasty delight will get the mouse up/down/move events and visualises them a little (It waits 50 each loop so you can see the events pass).



Thanks for the help, I'll look into getting this implemented in FUI.

COMING SOON: WIP updates.
Garghlebleurgh. Night.

EBA; FUI; Mario Land Ripoff.
Every time you post a joke in the form of code, mace yourself.
MonoCoder
18
Years of Service
User Offline
Joined: 4th Dec 2005
Location: england
Posted: 21st Nov 2007 21:53
Bump'dcha.

If you think this WIP frittered into death, you are wrong!

For the past- looking at the last post date- two and a bit weeks, I've been reworking the internal structure of FUI, coming to a near-complete layout involving an array for sorting Z-Order; Entity and Sub-Entity arrays and reference lists; and arrays for each kind of Entity, including new stuff like Treeviews (Who's unusual nature has spurred me to make this grand redesign).

All this, and interrupts for events which, at the moment, look as though they'll need their pointers hardcoding. (ie. make a button, call #included pointer-assigning function, passing the button's name, then it looks through a list of if's written by the user, calls the specified functions with a "get pointer" flag, returns the pointer, and hands it back to the entity.)

I'm probably going to start the re-code-arama this weekend, when I'm sure I've not missed ought.

Oh, I'll also be doing some stuff so frames can become movable windows. Imagine that, windows inside windows! Nuts.



Monotoaster

EBA; FUI; Mario Land Ripoff.
Every time you post a joke in the form of code, mace yourself.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 23rd Nov 2007 04:30
Quote: "If you think this WIP frittered into death, you are wrong!"

Awwwws, my attempt to make the thread fall to it's death failed.


Cheers,

-naota

"I choose to believe, what I was programmed to believe!"
Aex.Uni forums
Deathead
17
Years of Service
User Offline
Joined: 14th Oct 2006
Location:
Posted: 23rd Nov 2007 18:24
Quote: "death failed"

I didn't fail. lol Joking. Nice work MonoCoder.

[href=http://www.freewebs.com/deatheadstudios/]
[/href]

Login to post a reply

Server time is: 2024-04-20 05:44:02
Your offset time is: 2024-04-20 05:44:02