data containers
    Steven Schveighoffer 
    schveiguy at yahoo.com
       
    Thu Jul  3 07:19:07 PDT 2008
    
    
  
"Moritz" wrote
> Hello,
>
> Im currently working on a gui framework for my game, and Im trying to find 
> a versatile way to build my screens.
>
> I thought about a generic "Screen" class, which has functions like 
> "add_element()" to insert a sprite or text into a layer on the screen.
>
> Rendering is then done from the lowest layer to the highest one.
> My question is now how I can implement these Layers, since I didnt find 
> LikedLists or Hastables in Phobos.
>
> My Idea in C++ would be to have a hashtable int to linked list, which 
> gives me the linked list for a layer upon inserting the layer number, and 
> the linked list then contains my ScreenObjects (a base class for images, 
> text, buttons and so on).
> What would be the best way to do this in D?
I'm not a game programmer, but I did make a collections project for D that 
should support Phobos:
www.dsource.org/projects/dcollections
If you use it, let me know how it works for you.
-Steve 
    
    
More information about the Digitalmars-d-learn
mailing list