API:CharacterSettingsSetUiProfileShared
From RoR Wiki
UI Lua API · CharacterSettings functions
Version: WAR 1.4.8
Turns sharing of one of the current character's UI profiles on or off.
CharacterSettingsSetUiProfileShared(profileName, shared)
Arguments
- profileName
wstring– Name of the profile.- shared
boolean–trueto share the profile with other characters,falseto stop sharing it.
Returns
Nothing.
Details
- The profile must exist for the current character and be owned by it. Otherwise an error below is logged and nothing changes.
- The new value is stored as the profile's
isSharedflag and the profile's settings file is written again. - No event is fired.
sharedmust be a real boolean. Passingnilor a number raises an Invalid Parameters error.- The function needs at least two arguments and only reads the last two.
Errors
Logged; the call does not raise a Lua error:
ERROR in function call 'CharacterSettingsSetUiProfileShared': Profile name %s does not exist.ERROR in function call 'CharacterSettingsSetUiProfileShared': Profile %s is owned by another character and can not be modified.
Example
From ea_uiprofileswindow/source/manageuiprofileswindow.lua:
profileData.isShared = not profileData.isShared CharacterSettingsSetUiProfileShared( profileData.name, profileData.isShared ) ButtonSetPressedFlag( SystemData.ActiveWindow.name, profileData.isShared )
