UserMgr is available in your CManiaApp (or CManiaAppTitle). Everytime you are in your UI-Manialink-script (UILayer.ManialinkPage = """...<script>{{{here}}}</script>...""") you have the context CMlScript (or CManiaAppTitleLayer). You can always check with
log(This); which should give you something like
(CManiaAppTitle*)???. Then you can look at the documentation and see what is available and what isn't.
For you this means you would have your call to
ScoreMgr.Campaign_GetSkillPoints(UserMgr.MainUser.Id, SomeCampaign.CampaignId)); (SomeCampaign being e.g. DataFileMgr.Camapaings[0] if this is your campaign) in your
TM2UF Menu.Script.txt and then you would pass the result to the UILayer.ManialinkPage. Either into the string, e.g.
Code: Select all
SPLayer.ManialinkPage = """<manialink version="3">
<label textprefix="Skillpoints: " text="{{{SkillPoints}}}" />
</manialink>
or as variable for you Page like Qlex explained:
viewtopic.php?f=279&t=42482&start=10#p291221
Unfortunately I can't give you a minimal working example as it seems that I somehow failed to make a valid campaign configuration xD
On a more general note:
I would suggest using different layers for your different views and hide and show them according to scriptactions you pass from your UI-Manialink to your CManiaAppTitle-script (e.g. <label text="Solo" scriptaction="showview'solo" />, then catch it like you do with the CustomEventType "editors" and hide your UI-Layers accordingly). Splitting your views into multiple manialinks makes it a lot more readable and maintainable. (And you can set a "name" attribute on the manialink-tags which will be displayed in the debugger; sometimes it helps having a look at how Nadeo does things

)