Skip to content

Commit 95f8cea

Browse files
committed
Add get selected value fro drop down, UI utility function.
1 parent 3be7ded commit 95f8cea

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Assets/JCSUnity/Scripts/Utilities/JCS_Utility.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,5 +937,15 @@ public static bool IsArrayEmpty(string[] list)
937937

938938
return true;
939939
}
940+
941+
/// <summary>
942+
/// Get the current selected value of the Dropdown object.
943+
/// </summary>
944+
/// <param name="dd"> drop down object. </param>
945+
/// <returns> current selected text value. </returns>
946+
public static string GetSelectedValue(Dropdown dd)
947+
{
948+
return dd.options[dd.value].text;
949+
}
940950
}
941951
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Build from DESKTOP-5QUO247 at 7/9/2018 11:57:09 PM
1+
Build from DESKTOP-5QUO247 at 7/10/2018 12:27:41 AM

0 commit comments

Comments
 (0)