August 25, 2019, 09:13:21 AM

Author Topic: Qube's Game Framework - The dreaded GUI  (Read 1896 times)

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2053
Re: Qube's Game Framework - The dreaded GUI
« Reply #15 on: April 22, 2019, 11:47:28 PM »
Looking very swish, and other coding software to follow.  Cool.   8)
Thanks. Yup, I have to fight the boredom of GUI writing so I can use it to make the dev tools I have planned :P.

Cool thing about the GUI is I can use it in both low res ( that's the version in the screen shot ) and HD resolutions by just changing two variables, 1) The GUI sprite atlas to use and 2) Which font to use.
Until the next time...

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2053
Re: Qube's Game Framework - The dreaded GUI
« Reply #16 on: May 09, 2019, 02:43:21 AM »
Another super exciting update on my GUI adventures ;D

Tonight I put the finishing touches to the event system and implemented timers \o/

For the timer test I create a window, a label and a timer set to trigger once per second. When the event fires I update the text of the label with the current time. The code is as per below. Quite happy with how it's all turning out and soon I'll have enough to start creating some shiny new game making tools.

Code: [Select]
If gui_Event_Get( thisEvent ) = gui_Event_Match( gui_Event_Window, "timer 1" )
gui_Gadget_Find( gui_Event_Window, "label 1" )
If guiFoundGadget > 0
guiGadgets[ guiFoundGadget ].text = GetCurrentTime()
EndIf
EndIf

The code above is simply "look at the event" > "is it's label called 'timer 1'" > "yes - find 'label 1' in the window of the event" > "update it's text". Not bad considering AGK has no fancy frilly language gymnastic features :P

Soon I'll move on to the GUI designer which will output the source code to create the window & gadgets and also have blank If / EndIf's ready to fill in what happens if things are clicked etc.

Full on action video :

Until the next time...

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2053
Re: Qube's Game Framework - The dreaded GUI
« Reply #17 on: May 10, 2019, 10:29:15 PM »
Phew, finally at a stage where I can begin on the GUI designer. I've enough gadgets coded up to move on to the next step of this mind numbing project.

Early screen shot of my GUI designer ;D :P

Until the next time...

Online GaborD

  • Sr. Member
  • ****
  • Posts: 293
Re: Qube's Game Framework - The dreaded GUI
« Reply #18 on: May 11, 2019, 12:50:52 AM »
This looks really great!


Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2053
Re: Qube's Game Framework - The dreaded GUI
« Reply #19 on: May 11, 2019, 12:58:17 AM »
This looks really great!
Thanks :) - It's turning out well and will be useful for in-house tools. I know a GUI based thread is very boring for many people and also a very boring theme to watch video's of GUI stuff :( - But I must inflict my personal pain on others ;D

Hopefully the next updates with the GUI designer and then level maker in action will be somewhat more, erm exciting? :P
Until the next time...

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1190
Re: Qube's Game Framework - The dreaded GUI
« Reply #20 on: May 11, 2019, 12:13:05 PM »
Well impressed :)

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2053
Re: Qube's Game Framework - The dreaded GUI
« Reply #21 on: May 15, 2019, 01:17:43 AM »
For those still following the thread that haven't fallen into a coma yet...

I've finally got enough gadgets done to warrant moving on to the next dull, I mean exciting phase ... "The GUI Designer"

Below is a 1st steps video demonstrating adding gadgets to a window. Super exciting I know but even more exciting is the next step of being able to drag those gadgets around and setting their properties. After that will be the code generation part of the GUI designer.

It's all happening at a slow pace but I don't want to over excite myself at this old age :P

Until the next time...

Offline blinkok

  • Full Member
  • ***
  • Posts: 112
Re: Qube's Game Framework - The dreaded GUI
« Reply #22 on: May 15, 2019, 04:12:15 AM »
Looks very nice! Can you resize the window smaller than the area used by the controls.

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2053
Re: Qube's Game Framework - The dreaded GUI
« Reply #23 on: May 15, 2019, 04:22:45 AM »
Looks very nice! Can you resize the window smaller than the area used by the controls.
You sure can :) - All clipping is pixel perfect and will be demonstrated in a later video once I add in the visual side of editing gadgets.
Until the next time...

Online GaborD

  • Sr. Member
  • ****
  • Posts: 293
Re: Qube's Game Framework - The dreaded GUI
« Reply #24 on: May 15, 2019, 05:42:14 AM »
For those still following the thread that haven't fallen into a coma yet...

Well, I am sure not falling into a coma after that last vid.
The amount of functionality you already have in there is amazing.
Very impressive.

Offline Steve Elliott

  • Hero Member
  • *****
  • Posts: 1924
Re: Qube's Game Framework - The dreaded GUI
« Reply #25 on: May 15, 2019, 10:18:17 AM »
GUI Designer, very nice. I'm all for writing code rather than running through menus, but this is an exception that will save a ton of time - just drag n drop.
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
MacOS Mojave, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.
Linux Mint 19.1, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
Raspbian Buster, pi4 4Gb RAM,1.5Ghz

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2053
Re: Qube's Game Framework - The dreaded GUI
« Reply #26 on: May 15, 2019, 03:20:13 PM »
Quote
The amount of functionality you already have in there is amazing.
Very impressive.
Thanks. Lot's to do yet but its slowly taking shape :)

Quote
GUI Designer, very nice. I'm all for writing code rather than running through menus, but this is an exception that will save a ton of time - just drag n drop.
Yes, hand coding GUI windows is very slow going and so this mind numbing exercise ( not a big fan of GUI coding ) will speed up that side, especially when I start coding game related tools.
Until the next time...

Offline Derron

  • Hero Member
  • *****
  • Posts: 2337
Re: Qube's Game Framework - The dreaded GUI
« Reply #27 on: May 15, 2019, 05:54:46 PM »
Have fun to include all the property-widgets so you can setup the "special" stuff of each widget (custom font, custom text limitations, min/max of spinners, ...). THIS is the nasty stuff of a GUI designer ;-)

Blueprints would be cool too (so you can "click together" that eg. a button is set to "hidden" if another one is clicked). This is all GUI stuff, so it should not be stuff the coder has to have a look at - it is a matter for the designer dude. Also it is easier to do stuff by mouse (if possible) than wiring it up by hand in code, compile, try ...


bye
Ron

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2053
Re: Qube's Game Framework - The dreaded GUI
« Reply #28 on: May 15, 2019, 08:15:52 PM »
Quote
Have fun to include all the property-widgets so you can setup the "special" stuff of each widget (custom font, custom text limitations, min/max of spinners, ...). THIS is the nasty stuff of a GUI designer ;-)
That's the part I'm working on now. I don't need custom fonts per gadget as I like a uniformed look for GUI text and I'd never use that feature.

Quote
Blueprints would be cool too (so you can "click together" that eg. a button is set to "hidden" if another one is clicked). This is all GUI stuff, so it should not be stuff the coder has to have a look at - it is a matter for the designer dude. Also it is easier to do stuff by mouse (if possible) than wiring it up by hand in code, compile, try ...
I have group support for things like buttons, so I can enable / disable all in that group. Also radio groups are of course automatically handled. The idea to link x with 1 2 3 4 sounds a cool feature on the surface but I can't see a scenario where I'd use it over and over again to speed up GUI coding.

The GUI designer will have all the basics to quickly make GUI's and generate the source code with blank If / EndIf statements for events related to that window. It'll save a load of manual creation of GUI stuff. If / when it becomes apparent that additional features are needed then they'll get added based on need rather than "wouldn't it be cool if" as I'll be adding funky pointless stuff forever :P
Until the next time...

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2053
Re: Qube's Game Framework - The dreaded GUI
« Reply #29 on: May 15, 2019, 09:27:45 PM »
Looks very nice! Can you resize the window smaller than the area used by the controls.

Here you go, just for you :) - early video of widgets in action :P

Until the next time...