Page 3 of 12

Re: SweetyVD (Visual Designer)

Posted: Fri Apr 28, 2017 1:36 pm
by ChrisR
I have updated SweetyVD.
The model was revised to manage both real gadgets in designer (as before) and now also internal draw gadgets.
- Containers (Container, Panel, ScrollArea) and the Frame Gadget are now drawn to avoid overlay problems.
Without the overlap concern, containers management (Parents / Children) with displacements grouped, may be envisaged. And, if needed, other gadgets can be drawn later.

The Drawing area is now a canvas container, so PB 5.60 is required.

Gadget Templates are now loaded from a customizable JSON file.
- If SweetyVD.JSON does not exist in current directory, it is automatically created from internal templates, for a next customization.
- Stargâte's TabBarGadget.pbi Is included by default in SweetyVD http://www.unionbytes.de/includes/tabbargadget/
- A start to add custom gadgets, by adding the gadget template to the JSON file above. The type must be 50. There is an OnOffButton custom gadget example in SweetyVD github CustomGadget_Example folder

Thanks for your feedback, tests
:)

Re: SweetyVD (Visual Designer)

Posted: Fri Apr 28, 2017 3:32 pm
by blueb
The Drawing area is now a canvas container, so PB 5.60 is required.
Need to clarify... VD won't start with 5.60(x86)... only x64.

Started SweetyVD and placed a button on blank screen gives an error....

Code: Select all

Procedure Open_Window_0(X = 0, Y = 0, Width = 600, Height = 500)
  If OpenWindow(#Window_0, X, Y, Width, Height, "Window_0", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_ScreenCentered)
    (#Button_1, 330, 350, 100, 20, "Button_1")  ; <<<<<<<<<<<<<<<<<<<<<<<<< error
  EndIf
EndProcedure
Also it would be a nice addition to use a preference file that remembered your "last used" settings:
- SweetVD screen size (I have a 3840 X 2160 monitor) and have to constantly change settings
- Generated window size (e.g. I prefer 1024 X 768)
- drag space
- grid size
etc.

Even if the user had to modify the generated 'Preference file' manually, that would be acceptable.

Thanks in advance
--blueb

Re: SweetyVD (Visual Designer)

Posted: Fri Apr 28, 2017 4:04 pm
by ChrisR
blueb wrote:Need to clarify... VD won't start with 5.60(x86)... only x64.
I just tested with PB IDE and x86 compiler, it looks good here
I don't understand what's wrong for you.
blueb wrote:Started SweetyVD and placed a button on blank screen gives an error....
Indeed, I need to add a control to create the gadget only if the cursor is in the drawing area.
I'll look now.
blueb wrote:Also it would be a nice addition to use a preference file that remembered your "last used" settings
Yep, It will be in the next update, maybe you or others have a code allready done to save at least the position and size of the window in a pref (ini) file, with the loading then.

Re: SweetyVD (Visual Designer)

Posted: Fri Apr 28, 2017 4:11 pm
by blueb
I don't understand what's wrong for you.
Just found it... apparently the compiler flag was set for x64. I removed it and all is well. :)

I'll look and see if I have a suitable Preference starter file.

Re: SweetyVD (Visual Designer)

Posted: Fri Apr 28, 2017 4:13 pm
by ChrisR
blueb wrote:Started SweetyVD and placed a button on blank screen gives an error....
It's fixed now, minor change in line 1529

Code: Select all

Case #PB_Event_GadgetDrop
  If EventGadget() = #ScrollDrawArea
==>

Code: Select all

Case #PB_Event_GadgetDrop
  If EventGadget() = #ScrollDrawArea And ClickHoverDrawArea() = #True

Re: SweetyVD (Visual Designer)

Posted: Fri Apr 28, 2017 4:20 pm
by blueb
Nope... just changed the code to your suggestion.

The generated code error remains the same... sorry. :(

Re: SweetyVD (Visual Designer)

Posted: Fri Apr 28, 2017 4:56 pm
by ChrisR
Don't be sorry, it is good to fix bugs I did not see :wink:

Got it, in Line 1008 change

Code: Select all

For J=1 To ArraySize(ModelGadget()) 
==>

Code: Select all

For J=0 To ArraySize(ModelGadget())
I did not see it first because in my JSON file, OpenWindow (Type=0) was at the beginning => ModelGadget() array element 0.

However, the previous modification is not really useful, you can go back. I answered too quickly.
When Draging a gadget on blank screen, it is automatically moved into the drawing area, no worry on that.

Re: SweetyVD (Visual Designer)

Posted: Fri Apr 28, 2017 9:02 pm
by blueb
Chris,
Sent you a PM concerning sample preference file. :D

Re: SweetyVD (Visual Designer)

Posted: Fri Apr 28, 2017 11:18 pm
by ChrisR
Thanks Bob,
I have not yet played with the preferences files.
It seems roughly the same as ini files but with suitable PB functions.
It's a 3 day WE, here in France, Labar day.
I'll look as soon as I have some free time to make good use of it.

Re: SweetyVD (Visual Designer)

Posted: Sun Apr 30, 2017 3:35 pm
by Little_man
Have you tried your program;

If I use a ButtonGadget and drag it to the window, click somewhere in the window, then click on the Buttongadget, the buttongadget disappears.

The same with:
- OptionGadget.
- ImageGadget.
- ButtonImageGadget.
Etc.

Little_man.

Re: SweetyVD (Visual Designer)

Posted: Sun Apr 30, 2017 3:52 pm
by blueb
Not seeing it here.

I'm using PB 5.60 x64 on Win10 Pro.

Re: SweetyVD (Visual Designer)

Posted: Mon May 01, 2017 10:12 pm
by ChrisR
Little_man wrote:Have you tried your program;
No, I always publish without testing, it's so funny, lol :lol:

Seriously, no worries here either.
It is tested here with PB 5.60 x86/x64 in Win10 x64 but also tested in VMware: ubuntu 16.04 64-bits and Windows XP.
I do not understand how you have that, is your button is displayed above another gadget, in overlay ? what is your environment ?

Re: SweetyVD (Visual Designer)

Posted: Tue May 02, 2017 7:43 am
by Lord
ChrisR wrote:
Little_man wrote:Have you tried your program;
No, I always publish without testing, it's so funny, lol :lol:
...
He's going the Microsoft way. :wink: :D

Re: SweetyVD (Visual Designer)

Posted: Tue May 02, 2017 9:21 am
by ChrisR
:D
Yep, the best way for me, I do not have 1/100th of Steve Jobs's marketing skills :)

Re: SweetyVD (Visual Designer)

Posted: Tue May 02, 2017 9:34 am
by Little_man
Problem solved

Removed and reinstalled purebasic 5.60.

Little_man