Results 1 to 3 of 3

Thread: About entity layer control

  1. #1

    Default About entity layer control

    Just a newbie question, is there any grace way to control entity layers manually in my game GUI?

    e.g. Have 3 entities: main menu, shop, user info bar
    When enter shop from main menu, how should I keep user info bar staying on top layer of screen, instead of being overlapped by shop entity?

    Thanks a lot

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002


    One solution is put them in dummy empty entities, using entities as folders.

    Make these at the start of the game:


    Or, in code:

    GetRootEntity()->AddEntity(new Entity("GUI"));
    GetRootEntity()->AddEntity(new Entity("Overlay"));

    Now, anything you add to the entity Overlay (more entities) will always render over GUI, no matter what order they are added/removed later.

    To add the overlay, just make sure for its parent you use:

    Entity *pParent = GetEntityRoot()->GetEntityByName("Overlay");

    Seth A. Robinson
    Robinson Technologies

  3. #3


    It's working brilliantly following your thread, Cheers!
    Thanks a Lot

Similar Threads

  1. Entity Layouts via XML!!!
    By BigBMan in forum Proton SDK
    Replies: 3
    Last Post: 10-28-2011, 05:48 PM
  2. Database Access - Windows Access Control
    By Melodatron in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 10-16-2011, 03:04 PM
  3. Hands on physics control
    By speeder in forum Novashell Game Creation System
    Replies: 3
    Last Post: 07-14-2010, 10:49 PM
  4. CL_Sprite animation control in Clanlib 8.1
    By mcgregor927 in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 03-29-2009, 09:58 PM
  5. odd control scheme help
    By Uhfgood in forum Novashell Game Creation System
    Replies: 2
    Last Post: 07-05-2008, 06:40 PM



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts