Hi,
I tried developing some functionality to toggle the complete server controller UI based on events.
However, I couldn't manage to get the toggling working out of the box without having to add a dedicated Frame control.
I thought I could use Page.MainFrame.Visible but it seems like this property is ignored completely as the manialink elements stay visible. If I set it to False it will be True again on the next tick. Tested in TM & SM.
So I wonder if Page & MainFrame are even supposed to work in an ingame manialink (especially when sent by a server controller).
The properties are always filled (!= Null) but the frame doesn't have a ControlId. Is it possible to supply this MainFrame somehow? E.g. by using a specific control id for a frame in an own manialink?
It would be great if there would be an easy possibility to completely hide a manialink out of the box but I couldn't find one other than using an own frame element or something similar.
Does anyone have a solution for this?
Many thanks in advance!
Best regards,
steeffeen
CMlScriptIngame::Page::MainFrame
Moderator: English Moderator
- Nerpson
- Translator
- Posts: 1554
- Joined: 27 Sep 2013, 18:02
- Manialink: nerpson
- Location: France
- Contact:
Re: CMlScriptIngame::Page::MainFrame
Hello steeffeen,
Have you tried the property IsVisible from the CUILayer class?
Nerp.
Have you tried the property IsVisible from the CUILayer class?
Nerp.
Re: CMlScriptIngame::Page::MainFrame
I don't think a CMlScriptIngame can access any CUILayer. If it does, please show me how.

- Nerpson
- Translator
- Posts: 1554
- Joined: 27 Sep 2013, 18:02
- Manialink: nerpson
- Location: France
- Contact:
Re: CMlScriptIngame::Page::MainFrame
If it's a CMlScriptIngame, you have UI and ClientUI attributes which are CUIConfig objects. You can access layers trough them. (CUIConfig.UILayers)
Re: CMlScriptIngame::Page::MainFrame
That's right but the Layers are empty and there's no way to create one for manialinks sent by server controllers. Again, please prove me wrong. 

Re: CMlScriptIngame::Page::MainFrame
In case of, have you tested with Page.MainFrame.Show() and Page.MainFrame.Hide() ?
What is your manialink version number ?
Edit:
concerning UILayers, you could try ParentApp.UILayers, ParentApp.UI etc...
What is your manialink version number ?
Edit:
concerning UILayers, you could try ParentApp.UILayers, ParentApp.UI etc...
Re: CMlScriptIngame::Page::MainFrame
Tried that, it does the same as setting .Visible = False -> The variable becomes False but returns to True on the next tick without actually hiding the manialink elements.
I'm using v3
ParentApp is Null

also tried Page.MainFrame.ClipWindowXY, sizes and positions => everything is being ignored
however, it's interesting that the MainFrame actually contains the elements of your manialink as its .Controls - so there is at least some use to it

unfortunately i can't just loop through the controls and toggle them (even though this would actually hide them) because this would interfere with other logic that toggles certain controls like menus, tooltips, paging, etc.
therefore the only solution I see currently is do add a wrapping frame around everything - though i don't want to do that, for one because of complexity and also because all the containing controls would share the z-index of the wrapper frame which causes other issues
keep the ideas coming!

Re: CMlScriptIngame::Page::MainFrame
not helpful!

Re: CMlScriptIngame::Page::MainFrame
Hi there !
The Page.MainFrame attribute is read-only, as many of it's parameters (including visibility) are computed by the game, depending on various parameters.
Creating a dedicated root frame control looks like a good way to achieve your goal. What makes you want to find an other way ?
Have a nice day,
-- noyranea
The Page.MainFrame attribute is read-only, as many of it's parameters (including visibility) are computed by the game, depending on various parameters.
Creating a dedicated root frame control looks like a good way to achieve your goal. What makes you want to find an other way ?
Have a nice day,
-- noyranea
Who is online
Users browsing this forum: No registered users and 2 guests