Home Forum Downloads My Favorites Register FAQ Mark Forums Read

Go Back   EQInterface downloads > Interface Pieces > Utilities
User Name
Password

Category: UtilitiesEQInterfaceArchitect - C# Source Code
Interface Information
Download Now!
Learn how to install (faq).
View Pictures. Post A Comment

Name: EQInterfaceArchitect - C# Source Code   Popular!
Author:
Date: 09-14-2008 03:32 AM
Size: 313.14 Kb
Version: v0.1 pre-alpha


Pictures
Click to enlarge 

Views: 0
Size: 365 b
Dimensions: 32 x 32
 
Description
Off the bat I will say this since people will do it anyway, this is not a full working copy of the program, it is the source code (maybe even my last compile of it).

I am posting this for anyone that would like to work on it. I very rarely go in and touch the source anymore and it's still a ways from completion. All the old drawing stuff I was doing was removed when I started to implement a new way of doing things.

If you begin working on/with the code and have questions, feel free to ask, I'll try to make it a habit to check my inbox daily now that I've posted the code here, but be aware that sometimes it'll take me a week or two to reply. If I make any significant changes to the code I'll post the results add an update/addon, but don't expect much as I really lost my motivation for completing this project.

Currently all that's really working is the xml deserialization, all the elements in the specified UI will be loaded. The TextureInfo and Ui2DAnimation objects do work but with some bugs, the Ui2DAnimations will not animate, began working with render targets for those and never really finished the code for that, so only non-animated Ui2DAnimations will actually be drawn.

The solution and project files were created with a basic install of Visual C# 2005 Express, XNA Game Studio 2.0, and .Net 2.0 w/ Visual C# Service Pack 1.

A list of contents:
EQIA.Xna (project) - this project is the core, it's the class library I was aiming to build up, the idea is to keep it re-usable for future developers.

There is a code file in the base level called interfaces, which contains C# interfaces that are meant to serve as the implementation for elements, though currently they only really serve as a prototype in EQIA.Xna itself, the EQIA.Studio project shows in EQInterfaceSurface how I intended to use them.

EQIA_Object - the base class for the classes that need to be serialized to/from xml using the .Net XmlDeserializer. When it encounters problems deserializing, the IsErrorInXml flag will be set to true.

EQIA_Game - this class is a monster in disguise, it will set up an Xna Game object for drawing onto a form and sizing the graphics device to allow the form to fit inside the current back buffer of the graphics device. I think I did a good job of documenting it with the in-file XML documentation.

EQIA_Form - this class is a barebone form that stores an EQIA_Game object, meant to replace the reference to the System.Windows.Forms.Form after creating your forms normally.

ControlSurface - this class will accept a control which will be the target of any drawing performed in it's DrawSurface method. Each one of these will have to create a render target, and in turn a texture to store that target's contents, so it's advisable to be aware of how many of them you use since they consume video memory. For the inheritors of this class you can force it to redraw the surface by setting IsRequireRedraw to true.

ControlSurfaceManager - a game component using the DrawableGameComponent construct of Xna that will manage a collection of ControlSurfaces. Easy enough to use, just create it in your form, then use EQIA_Form.Game.Components.Add method. It's advisable to only use one of those since that's all that you should need.

EQIA.EQIDL (namespace) - contains all the elements of the EQUI, minus Point since the XNA Framework one works just fine for that. The RGB element does need a tad bit of work, it may just be my preference of doing things but initially it was just going to be used to serialize an Xna Color to the EQ RGB structure, but some odd serialization bugs started to appear recently so it's been gimped down, details are pointed out in a TODO statement in that class.

EQIA.Xna.Management (namespace)
EQInterfaceFile - represents a single file in the EQUI, it loads the xml into an Xml Document and contains a Deserialize method. It's meant to be a child of EQInterface class since only a list of element names are stored in the class itself.
EQInterface - represents an entire interface, it's Deserialize methods works on an EQUI.xml file, when one isn't present it will just check for xml files defined in the default interface if one was loaded. This class can probably use a function to fall back on default ui elements, it had one but that mysteriously dissapeared.
EQInterfaceManager - represents a collection of interfaces, it's there that you could load up the default UI and pass off get element calls to the right UIs, but well it's just a shell currently.

EQIA.Studio (project) - I guess all this really does is serve as an example of how to implement some of the functionality of EQIA.Xna, though if you plan to work on this taking a look at the EQInterfacePieceContainer and EQInterfaceSurface is a good idea to see examples of implementations.

License:
By downloaded this file you agree that you will not host this file on another site without first asking myself. Any changes made to the source code should at least be briefly explained. If you choose to use any of the code contained inside the projects contained in the zip file, you agree to give me some form of credit in an easily accessible place of your program.

File Statistics
User Rating:
 out of 5 with 0 votes
Downloads: 3230
Views: 26003
Uploaded By:
 
Last Modified: N/A

View Pictures. Download Now! Post A Comment


Post A Reply
Author Comments Sort Comments
Old 12-22-2008, 07:47 AM  
shillingworth
A Predatory Creeper
 
Interface Author - Click to view interfaces
Server: Bertoxxulous
Forum posts: 251
File comments: 32
Uploads: 10
Well the updates I was working on got scrapped as it got way overcomplicated and difficult to manage. I dunno if I ever will post an updated version, I have been working on it a little here and there, but well just haven't gotten anything completed enough to really post.

Apparently when you use XNA in a windows form like I was, you need to set the Microsoft.Xna.Framework.Input.Mouse.Handle property to match the form your drawing on to. I thought that was just for mouse to function, but after looking through a lot of reflected code behind XNA, it's used throughout the API for small little things that are easy to miss at first glance. It definitely cleared up the bugs I was seeing once I set the property in my test project though.
shillingworth is offline Report comment to moderator   Reply With Quote Reply With Quote
Old 11-02-2008, 04:31 AM  
shillingworth
A Predatory Creeper
 
Interface Author - Click to view interfaces
Server: Bertoxxulous
Forum posts: 251
File comments: 32
Uploads: 10
I am working on some updates to do currently. The updates will be for XNA 3.0, .Net 2.0/3.5, and Visual C# 3.0, now that XNA 3.0 is out I'm learning about the new language features in C# 3.0 and loving some of them. I'm also working out a better way to draw with XNA onto a win form, the way I've been doing it has some big flaws.
shillingworth is offline Report comment to moderator   Reply With Quote Reply With Quote
Old 10-01-2008, 01:59 PM  
shillingworth
A Predatory Creeper
 
Interface Author - Click to view interfaces
Server: Bertoxxulous
Forum posts: 251
File comments: 32
Uploads: 10
RGB fixed

Figured out a fix for the RGB struct and it was kinda dumb I didn't notice it.

To get the commented out functions (conversions and comparisons) to work, add the following to the RGBConverter.

In CanConvertTo change
Code:
return destinationType == typeof(RGB) ? true : base.CanConvertTo(context, destinationType); to return destinationType == typeof(RGB) || destinationType == typeof(Color) ? true : base.CanConvertTo(context, destinationType);


In CanConvertFrom change
Code:
return (sourceType == typeof(string)) ? true : base.CanConvertFrom(context, sourceType); to return (sourceType == typeof(string) || sourceType == typeof(Color)) ? true : base.CanConvertFrom(context, sourceType);


In the first line of ConvertTo change
Code:
if (value != null && value.GetType() != typeof(RGB)) to if (value != null && value.GetType() != typeof(RGB) && value.GetType() != typeof(Color))


In ConvertFrom add the following.
Code:
if (value.GetType() == typeof(Color)) return new RGB((Color)value); right above return base.ConvertFrom(context, culture, value);


Once those changes are made, the RGB structure works as intended, to only exist during serialization to allow an XNA Color to serialize to an EQ RGB, this way those colors are stored in each class that uses them as Color and the XmlElement tags get a Type = typeof(RGB) to point it to the right structure. The conversions tend to slow down the serializer but it's better imo than creating a new Color object each time you draw an individual element.
shillingworth is offline Report comment to moderator   Reply With Quote Reply With Quote
Post A Reply
All times are GMT -5. The time now is 08:02 PM.

Report problems with this file Report this File | Recommend this file to a friend Recommend this File
 
Category Jump:
Search this Category:
 

All times are GMT -5. The time now is 08:02 PM.


vBulletin Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI