GUI class

Rich

Active Member
3rd Party Module Dev
Joined
Sep 9, 2017
I complete the pinch and zoom last night.... Doesnt really show in the video sadly, but it does work ;-)
 

Phil7

Active Member
Joined
Jun 26, 2017
You could draw a semitransparent circle for each touch index to show the user interaction in the video.
 

Rich

Active Member
3rd Party Module Dev
Joined
Sep 9, 2017
You could draw a semitransparent circle for each touch index to show the user interaction in the video.
I thought the screen capture software was capturing them... I have added to the class when run in debug mode

 

Rich

Active Member
3rd Party Module Dev
Joined
Sep 9, 2017
Last night I released a beta version of the GUI class
Check the itch.io link in my signature

Why is it still in beta?
When adding a gadget to a tab, you specify the tab index..
Code:
Tabindex:int = GUI.AddTab("test")
Bttn:GuiButon = gui.AddButton(tabindex,image,x,y)
But the more I progress with the module I feel it should be..
Code:
Tab:GuiTab = gui.AddTab("test")
Bttn:GuiButton = tab.AddButton(image,X,y)
Thoughts?
Comments welcome
 

RaspberryDJ

Member
Joined
Jun 3, 2019
But the more I progress with the module I feel it should be..
Code:
Tab:GuiTab = gui.AddTab("test")
Bttn:GuiButton = tab.AddButton(image,X,y)
I agree, it's much cleaner and it says what it means.

Great work in any case!

Does the pinch zoom centre around the middle of the two fingers dynamically depending where they are? It looks on. the video like it zooms from the upper left corner?
 

RaspberryDJ

Member
Joined
Jun 3, 2019
tab is THE tab right? This are my two scents on the scheme :

Code:
sometab:guiTab = gui.addTab("test)
somebutton:guiButton = sometab.addButton(image,x,y)
 

Rich

Active Member
3rd Party Module Dev
Joined
Sep 9, 2017
@RaspberryDJ
Does the pinch zoom centre around the middle of the two fingers dynamically depending where they are? It looks on. the video like it zooms from the upper left corner?
You're right it does only zoom from top left of the image (not even the window)
This is something I plan to fix soon

Thanks for your feedback
 

Phil7

Active Member
Joined
Jun 26, 2017
But the more I progress with the module I feel it should be..
Code:
Tab:GuiTab = gui.AddTab("test")
Bttn:GuiButton = tab.AddButton(image,X,y)
I would also prefer that one.
Did you think about having more than one panel of tabs in a gui?
When I had a glimpse at your code I was thinking about having a container class wich could be extended by tabpanels, scrollAreas etc.
But it is definitely wise to set some limits how complicated the gui system should get. Otherwise endless effort is predicted ;)
 

Rich

Active Member
3rd Party Module Dev
Joined
Sep 9, 2017
@Phil7 @RaspberryDJ Ive now converted the code to the "other" option. It makes a lot more sense now. Originally I added via index of TAB to make it easy, but this way it just makes sense and is easier to read and code.

There is nothing stopping have multiple guis of tabs on the same screen. If the gui only has 1 tab, then the tab header can also be turned off

Heres a screen with 2 Gui's (and also my beta text input box and sliders)
627

Rich
 

Rich

Active Member
3rd Party Module Dev
Joined
Sep 9, 2017
sliders and text input.....

sadly the fix list has got slightly bigger ;-)
 

Phil7

Active Member
Joined
Jun 26, 2017
This is getting better every day!
Did you set the pinch ratio on purpose? To feel more intuitive, it could be nice to have the to points you pinch move together with the points of the image. And also be able to have a small image in the middle of the scroll area i.e. some space on the left and upper edge.
Just nitpicking ;)
 

Rich

Active Member
3rd Party Module Dev
Joined
Sep 9, 2017
@RaspberryDJ @Phil7 thanks for the kind words

@Phil7
Did you set the pinch ratio on purpose? To feel more intuitive, it could be nice to have the to points you pinch move together with the points of the image.
Yep... I did set a ratio. I will try to look at fixing pixels, i think it will feel better

And also be able to have a small image in the middle of the scroll area i.e. some space on the left and upper edge.
Im not sure what you mean here... like a small summary view showing the whole image and the section you're zoomed into?

v0.2.0 has now been released
 

Rich

Active Member
3rd Party Module Dev
Joined
Sep 9, 2017
Now ive got this far, I'm going back to the font editor to integrate a GUI
 

MikeHart

Administrator
Staff member
Joined
Jun 19, 2017
Location
Germany

Rich

Active Member
3rd Party Module Dev
Joined
Sep 9, 2017
now im fitting it into an actual application, Ive realised there are some basics missing

Ive now added Enable and Disable for all gadgets
 

Rich

Active Member
3rd Party Module Dev
Joined
Sep 9, 2017
After playing with blendmodes, i now have disable masks on all gadgets, including non-square buttons

Also
- fonts in themes work
- dynamic width buttons
- enable and disable gadgets

Time to finish off the extra docs and package it up

643
 
Last edited:
Top Bottom