| View previous topic :: View next topic |
| Author |
Message |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Sep 19, 2003 8:22 pm Post subject: DESIGN style: why not documented? |
|
|
Why is DESIGN never documented in help files? It's probably an "internal"
feature for the developers of VDS but I think it's really useful and it is not
too hard to learn about? I don't understand why it isn't ever documented.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Vic D'Elfant Past Contributor


Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Mon Sep 29, 2003 8:21 am Post subject: |
|
|
Tommy made a small dlgedit script which used the DESIGN style.
Perhaps it would help:
| Code: |
rem *** Visual DialogScript 3.51 specific code ***
rem Name: Dialog editor
rem Version: 1.0
rem Author: Tommy Sools tommy@sools.com http://www.sools.com
rem
rem Description:
rem A simple dialog editor with snapping grid
rem
rem Effects:
rem The grid is painted very slowly, it would be better to use a bitmap for the grid.
rem
rem
rem Copyright:
rem - You can use this source code in personal projects,
rem compile it in an .EXE file and distribute it freely in binary form.
rem - You cannot redistribute this source code without permission of the
rem original author.
rem - This software is provided AS IS, without any warranty of any kind.
rem - The author may have set additional copyrights for this software,
rem which in that case are mentioned in the author's description of the
rem source code.
%%GridSize = 8
%%TextNum = 0
%%PaintGrid =
option decimalsep,.
dialog CREATE,New Dialog,-1,0,240,160,DESIGN
dialog ADD,STYLE,editor_black,,6,,BLACK,BACKGROUND
dialog ADD,BUTTON,TEXT1,8,10,,,Text1
dialog SHOW
if %%PaintGrid
%A = -1
%C = -1
repeat
%A = @succ(%A)
%B = -1
repeat
%B = @succ(%B)
%C = @succ(%C)
dialog add,text,editor_grid%C,@prod(%A, ,@prod(%B, ,1,1,,editor_black
until @equal(%B,@pred(@div(@dlgpos(,W), ))
until @equal(%A,@pred(@div(@dlgpos(,H), ))
end
:evloop
wait event
goto @event()
:TEXT1CLICK
dialog attach,text1
goto evloop
:TEXT1CHANGE
%E = T
gosub gridadjust
dialog setpos,TEXT1,%D
%E = L
gosub gridadjust
dialog setpos,TEXT1,,%D
%E = W
gosub gridadjust
dialog setpos,TEXT1,,,%D
%E = H
gosub gridadjust
dialog setpos,TEXT1,,,,%D
dialog detach,TEXT1
dialog attach,TEXT1
goto evloop
:GRIDADJUST
%A = @dlgpos(TEXT1,%E)
%B = %A
if @not(@numeric(@fdiv(%B,%%GridSize).0))
repeat
%B = @pred(%B)
until @numeric(@fdiv(%B,%%GridSize).0)
end
%C = %A
if @not(@numeric(@fdiv(%C,%%GridSize).0))
repeat
%C = @succ(%C)
until @numeric(@fdiv(%C,%%GridSize).0)
end
if @greater(@diff(%A,%B),@diff(%C,%A))
%D = %C
else
%D = %B
end
exit
:CLICK
goto evloop
:CLOSE
exit
|
Or, if vds_code.php won't work , you can download it here
I also wish it would be documented in the helpfile, because I was planning to create a more advanced (and more professional looking) dialog editor. Is the Dialog Designer's source code available for download to the public, or do you need to be a registered vds user?
Vic _________________ phpBB Development Team |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
Vic D'Elfant Past Contributor


Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Mon Sep 29, 2003 1:01 pm Post subject: |
|
|
I hope they will
Vic _________________ phpBB Development Team |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Sep 29, 2003 1:08 pm Post subject: |
|
|
Er, it's not the most easily understandable piece of code I've ever seen. I didn't write it, and I don't have a clue what most of it does. If that's what you want to do, you might be better off starting from scratch... _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Mon Sep 29, 2003 2:25 pm Post subject: |
|
|
Dialog designer is missing in certain important areas just for example dealing with multiple dialog elements eg. user wants to swap two buttons or arrange all of them along the left side. Equalize the space between all the similar elemnts or arrange the item as from Y to X axis. Resize all the elements by using a reference element. Undo option.
I incorporated most of the above things (there are many more) in to a Dialog designer assist for myself. I posted it too with detailed help and source code too.
http://forum.vdsworld.com/viewtopic.php?t=1960
I don't know if any one has tried it. I does have limitations as it manipulates things externally and has no access to the data maintained in the VDSlists, but does help me atleast. (you should disable snap to grid for it to work)
DD has seen no major change since it's inception except new elemnts
I thought @LIB() function was added for this but it doesn't seem they used it.
Else many/most of the problems could have been solved and really *cool* features could have bben added. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Mon Sep 29, 2003 2:48 pm Post subject: |
|
|
| It may be a good idea to have a opensource dialog designer that we all develop together. This may prove to be a better alternative to the VDS supplied one. |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Sep 29, 2003 3:00 pm Post subject: |
|
|
A dialog designer is a horrible thing to write. I wrote the one for VDS 2 in Delphi. It was very flaky. I added the DESIGN mode when I was finishing off VDS 3 for SADE, so that the dialog designer could be written in VDS. I wrote a simple one using it, but the current one is quite a lot more sophisticated than that. Personally I find it quite adequate, but for many minor adjustments I prefer to edit the actual code. I get the same spacing between elements by doing a bit of mental arithmetic. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Sep 29, 2003 3:17 pm Post subject: |
|
|
A dialog desiger in 100 lines. This I must see...  _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Mon Sep 29, 2003 4:07 pm Post subject: |
|
|
There also is a 'remove' button when editting your script...
Btw. Julian, it's a bit more, but I was giving a general idea... I'm working on one now, and I only have to implend code to change element positions. After that, I'll show it...  _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Mon Sep 29, 2003 4:09 pm Post subject: |
|
|
I know. I could have deleted it too.. that would have been too easy.  _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Sep 29, 2003 7:31 pm Post subject: |
|
|
| PGWARE wrote: | | It may be a good idea to have a opensource dialog designer that we all develop together. This may prove to be a better alternative to the VDS supplied one. |
YES!
I agree totally with you and I said the same thing a long time ago
but nobody listened really.
I run into a lot of bugs that I don't always have time to report and
I think I would add a lot of things into it.
The best thing about opensource code is that it gets developed
really quickly, the bugs are worked out really quickly, and it becomes
a really stable and featureful (it that even a word? ) piece of code.
I really think that would be a good idea.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Mon Sep 29, 2003 7:39 pm Post subject: |
|
|
I agree. Let's get to it!  _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
|
|
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 You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|