Jump to content
  • Advertisement
  • entries
    707
  • comments
    1173
  • views
    436777

wewt

Sign in to follow this  
Programmer16

126 views


Dragon Forge Technology

I finished up the input system just now. I had to redesign the drag-and-drop system a little bit. BaseMessageHandler now has a virtual function named OnDrop(const DropEvent &Event) that is called for whichever entity is under the drop point.

I also rewrote the inners of the whole drag-and-drop system. Originally I was just having the user fill a void pointer and setting an integer to specify what kind of data was in the pointer. Obviously, there are some glaring issues with that setup. Mainly, it's not type safe and it's not setup to handle arrays/vectors.

With the new setup, it's not really handled in any better way since it's still not type safe, and you can't use it as an array/vector without casting, but with the new system you should be passing an array or vector.

With the new system, the delegate stores a vector of DragEventObject, which contains a void pointer and the ID integer. This vector is what is passed around to different events (instead of just a void pointer and a type id integer.) Still faulty, and definitely not type safe, but much better than before. It'll work for now; at least until I have time to try to come up with a better solution.

I just finished modifying the system (again lol.) Most of the functionality seen in the movie was external code (the only things that are automatically handled by the system are drag-start, drag-update, drag-end, and drop.) So, I generalized my code, made a templated class, and now you can have an icon style system (like in the movie) in a few steps.

Here's a movie of the system. Link (558kb)

So, that finishes up the input stuff. Now I have to move on to the actual engine code; then it's GUI city. After that I'll be all set for MalykAI and its editor.

Time for bed; I've got a lot of work to do tomorrow (on both DFT and TLCoM's map editor.)
Sign in to follow this  


2 Comments


Recommended Comments

Just wanted to drop a comment in, that "I'm still watching you". And no, not in the creepy way. Just haven't had anything particularly productive to say to your entries, but I'm still here. Keep up the progress. [smile]

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!