HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: GUI controls become hidden behind the static asset  (Read 2492 times)

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile
GUI controls become hidden behind the static asset
« on: Jul 15, 13, 11:24:41 PM »

Hi!

I have a situation like in this picture:



Usually everything works ok, but sometimes i get these GUI controls (marked red) hidden behind the static asset, so that my character which is looking at them doesn't see them. How do i fix it? I would like that these GUI controls always have priority over static assets.

BR
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1160
  • Never stop learning
    • View Profile
Re: GUI controls become hidden behind the static asset
« Reply #1 on: Jul 16, 13, 06:53:35 AM »

There are layers in drawing of the screen and all the objects and other features. These layers determine when they are drawn. The last layer will be the layer last drawn on screen. I have not glued a GUI to a character yet, but guess I will when I add in guild tags. I put most of my GUIs on the game layer as it is one of the last few layers in the layer stack. As a group in the game layer they also can be all toggled off to see other things on screen, or take a snapshot of the screen.
Logged
Lead scripter for EO, Repop helper.
HSL Video tutorials:
https://community.heroengine.com/forums/index.php/topic,1719.msg36858.html#msg3685

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile
Re: GUI controls become hidden behind the static asset
« Reply #2 on: Jul 16, 13, 08:02:32 AM »

DO you know how to determine in which layer an object (GUI, asset, etc.) belongs?
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1160
  • Never stop learning
    • View Profile
Re: GUI controls become hidden behind the static asset
« Reply #3 on: Jul 16, 13, 05:56:11 PM »

In E_GUIClassMethods is a list of layers. I am not sure if GUIs are restricted to any certain layer. In a few scripts - GUIControlClassMethods, _GUILayerClassMethods, _GUIClassMethods, are some functions related to the layers. I have not used them yet.
Logged
Lead scripter for EO, Repop helper.
HSL Video tutorials:
https://community.heroengine.com/forums/index.php/topic,1719.msg36858.html#msg3685

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile
Re: GUI controls become hidden behind the static asset
« Reply #4 on: Jul 18, 13, 03:29:20 PM »

Check how the little bastard of a button gets hidden behind the mesh... Is it possible to gain better control over who gets priority [12MB video]?

https://dl.dropboxusercontent.com/u/79625595/HeroBlade%202013-07-18%2022-19-12-73.mp4
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1160
  • Never stop learning
    • View Profile
Re: GUI controls become hidden behind the static asset
« Reply #5 on: Jul 18, 13, 04:37:16 PM »

Here is the function and list of layers currently in most home worlds. The tooltip layer might be an ok layer to try the GUI on. It usually shows over most things in the list. I am not sure which layer the meshes are on, perhaps the bottom layer.

Code: [Select]
method HE_validGUILayersList() as List of String
  // a simple list of string which determines the names of layers that scripts may create
  // in addition to each layer specified, a "layerName_popupLayer" will be allowed as well
  //
  // The order into which layer names are placed in this list determines their
  // z-order on the screen.  The first layer inserted will be at the bottom, etc.
  layers as List of String
 
  add back "bottom" to layers
  add back "nameplates" to layers
  add back "default" to layers
  add back "game" to layers
  add back "cinematics" to layers
  add back "guieditor" to layers
  add back "guieditorutilities" to layers
  add back "alert" to layers
  add back "hotspot" to layers
  add back "tooltips" to layers
  add back "contextmenu" to layers
  add back "cursor" to layers
  return layers
.
Logged
Lead scripter for EO, Repop helper.
HSL Video tutorials:
https://community.heroengine.com/forums/index.php/topic,1719.msg36858.html#msg3685