Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    557
  • comments
    1237
  • views
    423620

Untitled

Sign in to follow this  
Evil Steve

89 views

Well, text drawing is done and working. I'm reworking my GUI manager which keeps a stack of active windows at the moment. There's something a bit odd going on there, but I'm not sure what. It's a bit of a mess anyway, and could do with a good tidy up.

The way it should work is as follows:
Each window can have up to 10 layered elements, and priority levels 1 to 201 are reserved for the GUI. That lets me have 20 windows open at once, which is more than I should need.
If I have a stack of windows like so:
  • Window 1, Layer 1
  • Window 2, Layer 2
  • Window 3, Layer 3
    And I want to bring Window 3 to the top, I would have to re-order everything. So what I do is I send Window 3 to priority 1 and distribute the other 2 over the remaining space (Since they're going to get moved anyway). So I end up with:
  • Window 3, Layer 1
  • Window 1, Layer 7
  • Window 2, Layer 13
    Or something close to that. This way, if I then need to bring Window 2 to the top, I can move window 3 down a layer, and bring 2 to the top. Basically, it means changing priority left, which could me quite expensive. Changing priority for a window means changing the priority for all of it's widgets, and that usually means removing and reinserting it into the scene graph. It might not be too expensive, but it's still something I'd rather avoid doing all the time.

    However, I might just be lazy and do the obvious thing and change all the priorities every frame, just to get something working. It depends if I can get it working on the way home or not. I got very little done this lunch break due to 3 bands adding me on MySpace, resulting in much spammage. Apparently after 50 comments, MySpace gives you one of those "Please type in the letters in the image above" things every 10 comments. Which slowed me down somewhat. Oh well, what a pity, who cares.
  • Sign in to follow this  


    0 Comments


    Recommended Comments

    There are no comments to display.

    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!