Muk Setting Row is a pre-build native look-a-like setting page row in Muk.
Create Muk Setting Row #
To create Muk Setting Section, create and select MukUICanvas, right-click in the Hierarchy > Muk > SettingPage > SectionRow. You will see a new object(MukSettingRow) created in the selected canvas or the first canvas in the Hierarchy (if no canvas is selected). If there’s no canvas in the Hierarchy, Muk will create a MukUICanvas for you and place the MukSettingRow in the newly created MukUICanvas.
Muk Setting Row Code #
You can set the call back functions via script eas well. Please see the code below.
using Muk;
// Assign the row in Inspector window
[SerializeField] private MukSettingRow toggleRow;
[SerializeField] private MukSettingRow gotoPage2Row;
private void Start()
{
// Toggle
toggleRow.toggleValue = true;
toggleRow.onToggleValueChanged.AddListener(OnRowToggleModeChange);
// Go to page 2 row
gotoPage2Row.onRowClick.AddListener(() => {
MukSceneManager.Instance.GoToScene("page2");
});
}
public void OnRowToggleModeChange(bool isOn)
{
print("OnRowToggleModeChange " + isOn);
}
Muk Setting Row - Properties #
Property | Desciption | Value |
---|---|---|
Platform Type | Which UI Platform should Muk Components display. | Device - Base on device. iOS UI for iOS device, Material design for others. iOS - iOS design. Material - Material design. |
Dark Mode | Use Dark mode or light mode. You can set color for each mode in theme settings. | Dark - Dark Mode. Light - Light Mode. |
Row Type | The type of the row, | TO_NEXT_PAGE - A arrow at the right, mainly for when it will go to other page. TOGGLE - A toggle that user can set. ICON - A image at the right. NONE - nothing at the right. |
Override Background Color | Should override the background color? | If ticked, it will show two options - iOS & Material, and each option will have two options inside(Light Mode color / Dark Mode Color). If not ticked, the system will get color from theme settings. |
Override underline Color | Should override the underline color? | If ticked, it will show two options - iOS & Material, and each option will have two options inside(Light Mode color / Dark Mode Color). If not ticked, the system will get color from theme settings. |
Title | The text of the center title. | |
Override title Color | Should override the title color? | If ticked, it will show two options - iOS & Material, and each option will have two options inside(Light Mode color / Dark Mode Color). If not ticked, the system will get color from theme settings. |
Left Icon | The icon image of the left image | |
Override left icon Color | Should override the left icon color? | If ticked, it will show two options - iOS & Material, and each option will have two options inside(Light Mode color / Dark Mode Color). If not ticked, the system will get color from theme settings. |
Right Text (TO_NEXT_PAGE type only) | The value of the text that's on the right. | |
Override right text Color(TO_NEXT_PAGE type only) | Should override the text Color color that's on the right? | If ticked, it will show two options - iOS & Material, and each option will have two options inside(Light Mode color / Dark Mode Color). If not ticked, the system will get color from theme settings. |
Overrider Arrow Color (TO_NEXT_PAGE type only) | Should override the arrow image color. | If ticked, it will show two options - iOS & Material, and each option will have two options inside(Light Mode color / Dark Mode Color). If not ticked, the system will get color from theme settings. |
Toggle value (TOGGLE type only) | The init value of the toggle. | |
On Toggle Value Change (TOGGLE type only) | Call back for when toggle is ticked. | |
Icon Image | The image of the icon that's on the right | |
Override icon Color(ICON type only) | Should override the icon Color color that's on the right? | If ticked, it will show two options - iOS & Material, and each option will have two options inside(Light Mode color / Dark Mode Color). If not ticked, the system will get color from theme settings. |
On Row Click | Call back for when the row is clicked. |