inexorgame-obsolete / deprecated-cube-engine-inexor

UNMAINTAINED: Please have a look at the vulkan-renderer
https://inexor.org
zlib License
11 stars 1 forks source link

Control UI/CEF layers from Inexor Flex #387

Open aschaeffer opened 7 years ago

aschaeffer commented 7 years ago

Goal

Make the CEF layers available in Inexor Flex, so it's possible to create, remove or modify layers and their properties.

Tasks

Tree Events

In Inexor Flex it is possible to watch on tree events by watching the postSet event of a tree node.

For example if a layer gets shown or hidden:

let layerName = 'console';
let layerVisibilityNode = root.ui.layers.getChild(layerName).getChild('visible');
layerVisibilityNode.on('postSet', function(oldValue, newValue) {
  [...]
});

The same applies to the other properties of a layer: URL, position and dimensions.

a-teammate commented 7 years ago

This should be done solely on flex side shouldn't it?

aschaeffer commented 7 years ago

I've updated the description.

You can find the Inexor Core counter part in inexor/ui/layer/:

The main work for Inexor Core is to make the properties available in the Inexor Tree.

a-teammate commented 6 years ago

After finishing this, I think it might be an idea to not only manage CEF layers (screen parts), but all rendering layers. I.e. the main ingame screen (where you see your playermodel and the world) just becomes a layer. Same for i.e. the model preview window. The API in flex could stay the same, but core would need some adjustments