Is there a way to create an instance of a GUI.HorizontalScrollbar where instead of returning a float value it returns an integer value between two points? For example, on each change I would like an integer year returned between 1900 and 2000.
Current Code:
float selectedYear;
selectedYear = GUI.HorizontalScrollbar(new Rect(Screen.width - 140, Screen.height - 80, 100, 40), selectedYear, 1.0f, 1900, 2001);
Desired Code:
int selectedYear;
selectedYear = GUI.HorizontalScrollbar(new Rect(Screen.width - 140, Screen.height - 80, 100, 40), selectedYear, 1, 1900, 2001);