Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / ViewGUI - Now with drag+drop WYSIWYG editor!

Author
Message
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Dec 2007 13:51 Edited at: 19th Apr 2008 13:01


That logo was made with ViewGUI using the new editor

DOWNLOADS

ViewEdit+ViewGUI+AddressOf Precompiler
ViewEdit v1.0
ViewGUI v1.5
AddressOf Precompiler v1.0

INFORMATION

The editor will work by itself, but you won't be able to compile any code that you export from it! If you want to compile the code, you will need at least ViewGUI as well, and if you want to add events in the editor, and then compile it, you will need the precompiler.

ViewEDIT v1.0 - UPDATED 5 APRIL

This will allow you to create GUIs with a drag+drop WYSIWYG editor.
You can then export these GUIs to a .dba file.

Instructions

Click on an item in the controls window, and then drag it out to create a new window. Click on a window to select it, and change it's properties using the properties window. To change a colour, click on it in the property window. To change a windows parent, delete a window, or export everything to a .dba, right-click on a window and choose the right option. To create an event, either double click the label next to that property, or type in the event name. If you do this, you will need the precompiler to compile what you save out. You will need the d3d plugin and IanM's matrix1utils plugin pack to compile anything.

Screeny



ViewGUI v1.5 - UPDATED 10 APRIL

This plugin allows you to compile projects that use ViewGUI's interface. You will need it to compile .dba's exported from ViewEdit.

Window list
Form
Button
Panel
Textbox
Label
Slider
Tab
Tabpage
Checkbox
Menubar
Scrollbar
Frame
Option
Listbox
RichTextbox

Menu item list
Label menu item
Bar menu item


Instructions

Before you use any ViewGUI commands, you should call VUpdateGUI. You should call this again, before every 'sync'. You can find a command list in the .ini file in the download.

Screeny

This is a screeny of the above ViewEdit project, having been exported and compiled:


AddressOf precompiler

This precompiler will replace all occurances of 'addressof <function name>' with 'get ptr to function(<function number>'. You will need it to compile code with events. To use it, drag and drop the .dba file onto AddressOfPrecompiler.exe



Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Dec 2007 16:19
Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 20th Dec 2007 17:43 Edited at: 20th Dec 2007 17:49
I really liked ViewEdit, it was quick and functioned pretty well (aside from the occasional quirk), one thing that I didn't see was the option to set a gadget's parent ID. Additionally, something that would be cool is to have a treeview layout that would allow you to view the different gadget's hierarchy/association.

Very quick and clean. I really like it.

Edit:
Tabpages seem to be a little picky, for instance, you have to create it within the little top panel of the tabpage window in order to make them part of a tabpage group.

Deletion of gadgets by pressing the 'delete' button on the keyboard would be slick also

Support the indie!
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Dec 2007 19:16
@Alquerian
Select pick parent window from the context menu, and then click on the window you want for the parent. Tabpages must be created on the top part of the tab window, because the middle part is part of an existing tab page.

Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 21st Dec 2007 16:29
Looks very promising. I hope to see more gadgets added. Poked with it a little and I must say that this is one of the few more or less fully workable GUIs.


ACER Aspire 5920G: Intel Core2Duo T7500 (2.20GHZ), 2GB RAM, NVIDIA GeForce 8600M GT 1280MB Total, DirectX10, DBPro 6.6b
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 21st Dec 2007 17:49
Thanks
In the editor, the only properties at the moment are those which affect all types of window. There are many more, specific to the type which you can't modify in the editor (yet) but can change from code. More window types will be added, when I finish what I said above (I already have a version where you can set properties specific to form windows)

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 21st Dec 2007 20:31
nice one diggsey. one thing though, in the final release will it make proper windows gui?
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 21st Dec 2007 20:39
@kaedroho
No, this is supposed to be a gui that doesn't depend on the windows GUI! If you have ever used BlueGUI or WinGUI (both use the windows GUI), you will see that there are certain problems that you just cannot overcome. One such example is that the DBP window does not update when performing drag+drop operations, leaving a nasty smear across the window until it is finished. Another problem is with missing events between syncs when DBP is running at less than about 60 FPS. Yet another problem is with not being able to draw directly to another window with DBP, unless the plugin you are using has a (slow) workaround for it. Using ViewGUI, none of these problems are present.


Progress so far:
Fixed a few small bugs
Added form window specific properties
Added button window specific properties
Added panel window specific properties
Adding textbox window specific properties

Blobby 101
17
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 21st Dec 2007 22:26
well, will you be adding an option to make it look like the windows gui? cos that would be very useful.


thanks to deathead for the sig! please Click on it!
demons breath
20
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 21st Dec 2007 22:41
haha blobby I doubt that would work; it would be a lot of effort to code it to look like just one windows style, but with all the people running different versions of windows that would be damn near impossible...

"A West Texas girl, just like me"
-Bush
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 21st Dec 2007 23:51
@blobby 101
I will not be adding that, but the way the GUI works, you can use the painted event to make the windows look however you want them

Profit
18
Years of Service
User Offline
Joined: 19th Feb 2006
Location: United States
Posted: 2nd Jan 2008 21:27 Edited at: 2nd Jan 2008 21:39
Hi Diggsey,
I'm considering using ViewGUI in my project. In code generated with the editor, there is a command called 'set alpha(0,0)'. I am missing the plugin with that command. I removed the line and everything appeared to work fine. I was wondering what plugin that command is in (or if it is even necessary)? Thanks.

edit: I tried a few more times, now I'm getting 'Windows has encountered an error and needs to close."

edit: Nevermind, just downloaded IanM's latest 'Matrix1Utility'. Great work on this and your physics plugin.

common people are walking in line.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 6th Jan 2008 14:07
Thanks, I've been on holiday for a week skiing, so I haven't been able to work on it. Now I'm back, I've caught some bug off somebody in the plane, so I feel sick, and I'm back to school tomorrrow, so as you can see, it will be a while before I can work on it again

Sid Sinister
18
Years of Service
User Offline
Joined: 10th Jul 2005
Location:
Posted: 10th Feb 2008 06:57
Any progress Diggsey? Looks pretty neat =]

"If I have seen a little further it is by standing on the shoulders of Giants" -Isaac Newton
-Computer Animation Programming Major @ Baker.edu-
bitJericho
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 2nd Apr 2008 03:57
Aye, anything new? This is exactly what I need


Hurray for teh logd!
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 2nd Apr 2008 20:14
I recently started work on it again The editor can now set the properties specific to the type of window as well as the generic ones I'm partway through adding menus to ViewGUI.

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 4th Apr 2008 16:46
Menus, context menus and scrollbars are done

A frame window with scrollable contents will be next

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 5th Apr 2008 22:30 Edited at: 10th Apr 2008 22:22
!!! HUGE UPDATE !!!


ViewEdit:

ViewEdit can now edit the type specific properties of controls.

ViewGUI:

ViewGUI now supports this HUGE list of gadgets:

Form
Draggable window for containing other controls

Button
Do I really need to explain this one???

Panel
A flat area to group gadgets, and to which you can optionally draw stuff.

Textbox
You can edit text

Label
You can write uneditable text on this.

Slider
You can pick a value by sliding a bar either vertically or horizontally.

Tab
Holds tab pages

Checkbox
Can be checked/unchecked or optionally partially checked

Menubar
Can hold menu items in a normal menu or as a context menu

Scrollbar
You can scroll stuff with it!

Frame
A flat area containing controls contained within the frames area. If you create scrollbars for it, you can scroll across the area.

Option
A true/false checkbox where only ONE option gadget in a group can be checked at any one time.

edit:
Listbox
A list of items, which can be selected. (Optionally, more than one can be selected at a time)

RichTextbox
A multi-line textbox capable of displaying formatted text and images. Can be readonly.


It also supports both a label menu item and a bar menu item (divider)

Enjoy!

Data
19
Years of Service
User Offline
Joined: 26th Nov 2004
Location: Winnipeg,Canada
Posted: 6th Apr 2008 02:03
This looks really cool, just a question about exporting, so basically does the program export all the images and everything as Darkbasic code?

Profit
18
Years of Service
User Offline
Joined: 19th Feb 2006
Location: United States
Posted: 6th Apr 2008 04:39 Edited at: 6th Apr 2008 04:39
AFAIK, it's a plugin and an editor. The editor exports code that makes using the plugin easier. No images though.

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 6th Apr 2008 13:58
ViewGUI uses no images by default, but certain controls like buttons and panels allow you to supply an image number to display in them. The editor allows you to pick image numbers for these gadgets, but does not yet allow you to load the images and save out code that will do this.

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 10th Apr 2008 16:55 Edited at: 10th Apr 2008 17:01
I've just finished a multiline RichTextbox control

It supports the following text formatting:

Different text colours
Different background colours
Different fonts
Different horizontal alignments
Different vertical alignments
Giving elements of the text an item ID, so you can tell if the mouse is over them when any kind of event happens (like clicking).
Inserting images directly into the text


It does not use the normal RTF format, which I think is much too over the top for this anyway, but instead uses this format:

[<format character><value>]

The following format characters are supported:
c - Text colour
f - Font
b - Back colour
i - Image
a - Horizontal align
v - Vertical align
<none> - Item

For colours, value is an index in the RichTextbox's colour table.
For fonts, value is the index of the d3d font you want to use.
For images, value is the image ID
For horizontal align, value can be 0,1 or 2, representing left, middle or right.
For vertical align, the same applies, but for top, centre or bottom.
For items, it is the item ID you want to associate with the piece of text.

Examples:
[c1] <-- will cause the text following it to take the colour represented by 1 in the colour table.

[v2] <-- will make it so that the bottom of the text is aligned with the bottom of the line.

[v0] <-- will make it so that the top of the text is aligned with the top of the line.

[i5] <-- will insert the image with an ID of 5 into the text.

[1] <-- will cause the text following it to have an ID of 1. Useful for checking if a particular piece of text is clicked.

To represent an open square bracket, just use '[]'. The right bracket will automatically not be drawn. For a close square bracket character, you can just use a normal ']'.

There are also a number of functions to make it easier for you to apply formatting, so that you don't have to worry about the above.

Some commands to appy formatting:
VSetRichTextboxTextColorID hwnd, start, finish, colorID
VSetRichTextboxTextFontID hwnd, start, finish, fontID
VSetRichTextboxTextBackColorID hwnd, start, finish, colorID
VSetRichTextboxTextHAlign hwnd, start, finish, align
VSetRichTextboxTextVAlign hwnd, start, finish, align
VSetRichTextboxTextItemID hwnd, start, finish, itemID
VRichTextboxAddImage hwnd, pos, image

Some commands to get the formatting of a specific character:
VGetRichTextboxTextColorID(hwnd, pos)
VGetRichTextboxTextFontID(hwnd, pos)
VGetRichTextboxTextBackColorID(hwnd, pos)
VGetRichTextboxTextHAlign(hwnd, pos)
VGetRichTextboxTextVAlign(hwnd, pos)
VGetRichTextboxTextItemID(hwnd, pos)

Commands to get a plain text version of the text, and convert between a position in the formatted text, and a position in the plain text:
VGetRichTextboxPlainText(hwnd)
VConvertRichTextboxRichPosition(hwnd, richpos)
VConvertRichTextboxPlainPosition(hwnd, plainpos)

There are many other commands, (too many to show here) for things such as altering the colour table, inserting and removing portions of text, and many other things.

I will release the new version of ViewGUI when I have done a bit more testing

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 10th Apr 2008 19:53
OK, I've released the version with the RichTextbox control

Ghthor
16
Years of Service
User Offline
Joined: 5th Apr 2008
Location:
Posted: 11th Apr 2008 07:49
You may be able to fix the Problem of the screen not updating while dragging a textbox by splitting the program into a new thread that handles the Mouse interaction. I haven't messed with threading this kind of process but I will try it out and see if its possible.

Taco Justice
Marth Koopa
16
Years of Service
User Offline
Joined: 23rd Apr 2008
Location:
Posted: 24th Apr 2008 03:14 Edited at: 24th Apr 2008 22:33
Just wondering if it is possible to have the Synergy Editor automatically use the AddressOf precompiler when compiling code, so it makes click events easier to manage. I tried it, but it doesn't seem to work, but I might be doing something wrong.

Other than that, this is a very good set of commands to use.
Chess
17
Years of Service
User Offline
Joined: 25th Mar 2007
Location: Québec, Canada
Posted: 10th May 2008 20:07
The link to download seems dead..?
Darth Vader
18
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 15th May 2008 08:13
I'm really ignorant at this sort of thing, I made a window with a button and labels on it, exported the .dba but now what do I do? How do I get it working in my projects?


Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 15th May 2008 19:33
@Chess
Works for me

@Darth Vader
Well, the exported code should work fine on its own, but to use it in your own projects, you can either start with that code and build on it, or copy all the create and set commands to where in the program you want the windows to be created. Also, add VUpdateGUI to your main loop, and copy across any functions generated.

Epimetheus
20
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Naples, Florida
Posted: 17th May 2008 12:05
For some reason I keep getting a compile error (constant name true cannot share the name of a reserved word or variable).

I have the latest version of the matrix1utils DLL installed.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 17th May 2008 21:37
You have installed a plugin which defines true and false as commands (not a good idea!). Comment the constant definitions of true and false in the include file.

Epimetheus
20
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Naples, Florida
Posted: 17th May 2008 23:57
Ok I removed all but required DLLs and still get a runtime error "Windows has encountered an error and needs to close."

I then test adding in all my DLLs and found that the true false problem was being caused by the eXtends DLL.

Does anyone else have this problem?
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 18th May 2008 01:39
@Epimetheus
The "Windows has encountered an error and needs to close." error is an error with your code, but like I said, for the true/false error just comment out the lines '#constant TRUE 1' and '#constant FALSE 0'

Epimetheus
20
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Naples, Florida
Posted: 18th May 2008 06:41
I'm compiling exactly what the editor outputs. I get the same run time error whenever I comment out the constants or compile without eXtends.

Strange error....may be because I modified the compiler with Milkman's OOP converter, although I did update to DBPro 1.068 after that.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 18th May 2008 22:12
Epimetheus
20
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Naples, Florida
Posted: 18th May 2008 22:27
It's the standard code that your editor outputs:



I'm probably going to reinstall DBPro tonight and see if that fixes it.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 19th May 2008 01:03
It could be that 1.068 broke it, if you are going to reinstall dbp anyway, could you try with an earlier version?

Epimetheus
20
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Naples, Florida
Posted: 19th May 2008 05:15
sure, what version(s) do you want me to try?
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 19th May 2008 18:37
I have 1.063, so if you install that version, it will show if it is a version problem.

Epimetheus
20
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Naples, Florida
Posted: 20th May 2008 03:19
Alright, I tested it with 1.063 and it worked fine, then upgraded to 1.068 and worked fine again. It was only when I reinstalled my eXtends plugin that I got the same error. Commenting out the true/false constants allowed it to work this time though.

Another question, are you planning on integrating the advanced sprites plugin into this system?
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th May 2008 19:12
It doesn't use sprites at all, so no. I'm glad it worked now

hookkshot
17
Years of Service
User Offline
Joined: 12th Apr 2007
Location: Adelaide, Aus
Posted: 19th Jun 2008 12:48
hey just wondering if you will be putting drop down boxes in this

www.splitsecondgames.com
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 19th Jun 2008 19:19 Edited at: 19th Jun 2008 19:21
@hookkshot
ViewGUI is soon to be replaced by another (millions of times better) GUI, so I'm not going to update it anymore

Here are just some of the features of this new GUI:
- Controls are scripted through LUA 5.1

- Drawing and mouse-over checking of ANY polygon, even convex, and also for these default shapes: Triangle, rectangle, rounded rectangle, rotatable ellipse, triangle list, and soon another very special one, that will be most useful for textured controls.

- All shapes can either be filled or outlined. When outlined, the lines can be optionally anti-aliased for smooth edges!

- Uses DirectX directly, so no unnecessary slow-down

- Font system, fonts can optionally be anti-aliased

- Themes (through .ini files)!

- All drawable shapes have UV-data, so an image can be textured onto them.

- Over 40 commands which can be used in LUA are already done. Less than 10 are needed from DBP, so you don't need to learn a large command set to use it.

- Open source controls: all controls are in open-source LUA, so if you want to improve them, it is as simple as opening them in your preferred text-editor and making a few changes.

- All mouse and keyboard data available to LUA controls

- LUA events

I am not going to give this GUI for free, although it will be at an easily affordable price.
That is all I am going to say now. I will make a new WIP thread for it when it is ready for it.

nackidno
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Där solen aldrig skiner
Posted: 25th Jun 2008 19:32
Sorry if this has been asked before. But can you import your own images to use as buttons/Window Designs? Or do you have any plans on implementing this?

- Elias, Damezean, Nackidno, Wonderboy

AntocGames - http://antocgames.se.nu/

Login to post a reply

Server time is: 2024-05-03 03:47:04
Your offset time is: 2024-05-03 03:47:04