Thread Tools Display Modes
06/16/15, 11:06 AM   #1
Provision
 
Provision's Avatar
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 43
Hide overflow of children element (WINDOW_MANAGER)

Hi,

I have :

Code:
UI = WINDOW_MANAGER:CreateControl(nil, GuiRoot, CT_TOPLEVELCONTROL)
//...

UI.Player[1] = CreateControl(nil, UI, CT_TOPLEVELCONTROL)
//...
My UI.Player can overflow out of the parent control. How can I hide overflow children of UI ?

I would like when UI.Player is on middle of border (50 % inside, and 50 % outside), show the part wich is inside.

Thanks
  Reply With Quote
06/16/15, 06:23 PM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
I think the best example how to show just a selected part of the child control is any minimap addon. (You will need to use scroll control.)
  Reply With Quote
06/17/15, 02:57 AM   #3
Provision
 
Provision's Avatar
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 43
Originally Posted by Garkin View Post
I think the best example how to show just a selected part of the child control is any minimap addon. (You will need to use scroll control.)
But I don't know what I search, and what it is...
  Reply With Quote
06/17/15, 03:13 AM   #4
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by Provision View Post
But I don't know what I search, and what it is...
I guess Garkin means this:
http://wiki.esoui.com/UI_XML#Scroll
http://wiki.esoui.com/Controls#ScrollControl
try to use it as a parent control for what you want to crop.
  Reply With Quote
06/17/15, 05:45 AM   #5
Provision
 
Provision's Avatar
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 43
I found it, and this morning I tried DimensionConstraints, I don't see the difference. ^^"
  Reply With Quote
06/17/15, 03:26 PM   #6
Provision
 
Provision's Avatar
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 43
I don't find instead of I make function who calculate position on border (like a minimap). x)


Last edited by Provision : 06/17/15 at 03:30 PM.
  Reply With Quote
06/27/15, 02:55 AM   #7
Provision
 
Provision's Avatar
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 43
If you have a sample to use "overflow: scroll", I would like to see it.
  Reply With Quote
06/27/15, 04:20 AM   #8
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
First to your sample in the first post: CT_TOPLEVELCONTROL should only be used for actual top-level, i.e. parent-less controls. Use CT_CONTROL for children.

If you want to clip child controls, you need to put them in a <Scroll> control (CT_SCROLL).

Lua Code:
  1. local clippingContainer = wm:CreateControl("$(parent)Container", UI, CT_SCROLL)
  2. local clippedChild = wm:CreateControl("$(parent)Child", clippingContainer, CT_CONTROL)

The Scroll control is used for scrolling lists for example. It can also apply smooth fade-out to contained controls near its edges, although I think it doesn't do that by default, so you shouldn't need to worry about that.
  Reply With Quote
06/27/15, 04:24 AM   #9
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,579
There is no simple "overflow: scroll" in the UI. Basically if you want to have scrollbars you need to create and place them yourself. There are some helper functions that are used for the ingame scroll bars that you might want to take a look at in order to make your own.

Maybe you can give us a screenshot of what you have and what you want to achieve?
  Reply With Quote
06/28/15, 09:45 AM   #10
Provision
 
Provision's Avatar
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 43
Thanks for your reply, currently I put this aside, of to do window which explains my addon.

I will try it next time, with your advice in mind.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Hide overflow of children element (WINDOW_MANAGER)


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off