It is currently Tue May 30, 2017 12:02 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Sun May 14, 2017 2:40 pm 
Offline
User
User
User avatar

Joined: Sun Jan 08, 2017 10:27 pm
Posts: 80
Location: France
Thanks, I have now managed to add several Gadgets :)
I had initially tried with a ScrollArea Container, seems better with HBox, VBox, GridBox or MultiBox.
The Faq's on the 1st post should be usefull for newsbie like me.


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Wed May 17, 2017 1:35 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Feb 25, 2013 5:51 pm
Posts: 473
Location: US or Estonia
This is something both SB and PB desperately needs. I'd even argue Dialog lib should replace the Window, Toolbar, Menu, and Gadget libraries completely since static geometry is pretty much obsolete in the field of UI/UX in 2017(since there is stuff with CGA all the way to 4K resolutions and different dynamic aspect ratios) and writing your own handlers even from templates is annoying.

Feature Requests from my brief testing:
  • Copy to Clipboard for both code and xml export
  • Some form of code stub to handle relative font sizing with native PB and SB font per platform. Basically LoadFont with a relative value for "Size" using window timer or thread state machine and sweep all text based gadgets using SetGadgetFont?

I made a pretty complex UI with it within 30 minutes of downloading it. My only complaints are with Dialog lib itself in how it has no way to control height expansion(no maxheight on anything but Window and SingleBox) and how it handles image cropping.

I think PB Dialog lib XML is identical to SB Dialog lib XML so your tool already works there too..

_________________
The truth hurts.


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Wed May 17, 2017 3:07 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Oct 26, 2015 2:55 am
Posts: 720
Location: Ukraine
tj1010 wrote:
This is something both SB and PB desperately needs. I'd even argue Dialog lib should replace the Window, Toolbar, Menu, and Gadget libraries completely since static geometry is pretty much obsolete in the field of UI/UX in 2017(since there is stuff with CGA all the way to 4K resolutions and different dynamic aspect ratios) and writing your own handlers even from templates is annoying.

...
I made a pretty complex UI with it within 30 minutes of downloading it. My only complaints are with Dialog lib itself in how it has no way to control height expansion(no maxheight on anything but Window and SingleBox) and how it handles image cropping.


Yes that library is really cool thing and decreases UI pain a lot, even though it is obliously not fully completed for now.

However it also has another problem -- those "runtime" procedures and dialogs xml itself are placed into binary as plain text, that of course allows easily to modify them and generally makes binary much more hackable. I was planning to add some obfuscation/encryption to fix this partially (and there are some other related ideas), but currently all remains as is.


Quote:
I think PB Dialog lib XML is identical to SB Dialog lib XML so your tool already works there too..

Nice if so. Btw I wouldn't be surprised if it was created for SB originally ^_^ As it really follows a lot concepts from web / CSS.


Quote:
Feature Requests from my brief testing:
  • Copy to Clipboard for both code and xml export
  • Some form of code stub to handle relative font sizing with native PB and SB font per platform. Basically LoadFont with a relative value for "Size" using window timer or thread state machine and sweep all text based gadgets using SetGadgetFont?


Nice 2 ideas, one which is first I'll probably add when program finally will get own options/config (thus it will be possible to switch export behavior between file and CB, to not bloat popup menu).

What about 2nd, I have idea of adding code like this (and related function to define font from designer):
Code:
  Define x = LoadFont(#PB_Any, "Consolas", 25)
  SetGadgetFont(-1, FontID(x))

Executed before dialogs open, it will replace all dialog gadgets font with one loaded, then dialog library automatically resizes controls and windows to fit all text with that loaded font/size.

Just didn't get what you mean as relative font size value? DPI scale factor? (if yes, it's not needed, at least Windows scales fonts automatically)


// hell I'm writing too much text after overdosed coffee + got brain hyperactivity from weather which is finally nice & summer :mrgreen:

_________________
... but there is no end to creation


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Wed May 17, 2017 5:35 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Feb 25, 2013 5:51 pm
Posts: 473
Location: US or Estonia
Lunasole wrote:
...
Yes that library is really cool thing and decreases UI pain a lot, even though it is obliously not fully completed for now.

However it also has another problem -- those "runtime" procedures and dialogs xml itself are placed into binary as plain text, that of course allows easily to modify them and generally makes binary much more hackable. I was planning to add some obfuscation/encryption to fix this partially (and there are some other related ideas), but currently all remains as is.
...

What about 2nd, I have idea of adding code like this (and related function to define font from designer):
Code:
  Define x = LoadFont(#PB_Any, "Consolas", 25)
  SetGadgetFont(-1, FontID(x))

Executed before dialogs open, it will replace all dialog gadgets font with one loaded, then dialog library automatically resizes controls and windows to fit all text with that loaded font/size.

Just didn't get what you mean as relative font size value? DPI scale factor? (if yes, it's not needed, at least Windows scales fonts automatically)


Proportionate to what it was in it's first state while maintaining aspect ratio. Like if a string field got taller and wider go as wide and tall as possible up to original proportion without breaking font aspect ratio. Basically keeping font same size relative to the gadget as it was originally.

I'm not even sure this is possible though without API stuff. You basically have to reload fonts and I seem to remember PB falls back to rounded font sizes or something.

A good test case would be a 800x600 dialog window maximized or dragged up to 4k.

_________________
The truth hurts.


Last edited by tj1010 on Wed May 17, 2017 6:12 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Wed May 17, 2017 6:05 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Oct 26, 2015 2:55 am
Posts: 720
Location: Ukraine
tj1010 wrote:
Proportionate to what it was in it's first state while maintaining aspect ratio. Like if a string field got taller and wider go as wide and tall as possible up to original proportion without breaking font aspect ratio. Basically keeping font same size relative to the gadget as it was originally.

I'm not even sure this is possible though without API stuff. You basically have to reload fonts and I seem to remember PB falls back to rounded font sizes or something.


I think too this will need API. Also it looks too complicated/specific to add it to code generator.

But your idea give me other idea ^^ For example, it is not too hard to make some simplest "plugin" system for Designer, to allow anyone generate code as they want, using custom DLL coded in PB for that.

// but well, "on a second view" such idea also looks too big for such a small tool. I don't think that lot of ppl are or will be using DD2
Probably should better ask Fred for plugin support :D (hah, I already did it once, seems it's hard for 3 platforms simultaneously)

Anyway, thanks for reply

_________________
... but there is no end to creation


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Wed May 17, 2017 7:24 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Feb 25, 2013 5:51 pm
Posts: 473
Location: US or Estonia
I'll probably use it regularly to prototype and export XML. My big projects hide screens by hiding containers. The write&run process of UI design is exponentially longer and more expensive. I do the same thing on mobile.

EDIT: Regarding XML hacking: Base64 over AES encrypt or ROT13 or packed memory in resource section. Anyone who can beat that can patch a UI structure and handler anyway..

_________________
The truth hurts.


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Sun May 28, 2017 1:06 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Oct 26, 2015 2:55 am
Posts: 720
Location: Ukraine
Spent some time for 1.0.0.5 :) See changes in that readme.

tj1010 wrote:
EDIT: Regarding XML hacking: Base64 over AES encrypt or ROT13 or packed memory in resource section. Anyone who can beat that can patch a UI structure and handler anyway..


Btw adding handlers using BindEvent() for example (instead of XML) should make some difference also.
Anyway "just ideas", for now I didn't needed something with encrypted or obfuscated dialogs

_________________
... but there is no end to creation


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye