public void OnGUI() { if (!isActive) { return; } SNWindow.CreateWindow(windowRect, windowTitle); CommandsGroup = commands.DrawGuiItemsGroup(); ToggleCommandsGroup = toggleCommands.DrawGuiItemsGroup(); DayNightGroup = daynightTab.DrawGuiItemsGroup(); CategoriesGroup = categoriesTab.DrawGuiItemsGroup(); if (currentTab == 0) { ScrollViewGroup = SNScrollView.CreateScrollView(scrollRect, ref scrollPos, ref scrollItemsList[currentTab], "Select Item in Category:", categoriesTab[currentTab].Name, MAXSHOWITEMS); VehicleSettingsGroup = vehicleSettings.DrawGuiItemsGroup(); SNHorizontalSlider.CreateHorizontalSlider(sliders[0].Rect, ref seamothSpeedMultiplier, 1f, 5f, sliders[0].Name, sliders[0].OnChangedEvent); SNHorizontalSlider.CreateHorizontalSlider(sliders[1].Rect, ref exosuitSpeedMultiplier, 1f, 5f, sliders[1].Name, sliders[1].OnChangedEvent); SNHorizontalSlider.CreateHorizontalSlider(sliders[2].Rect, ref cyclopsSpeedMultiplier, 1f, 5f, sliders[2].Name, sliders[2].OnChangedEvent); } else { ScrollViewGroup = SNScrollView.CreateScrollView(scrollRect, ref scrollPos, ref scrollItemsList[currentTab], "Select Item in Category:", categoriesTab[currentTab].Name); } }
public void OnGUI() { if (!isActive) { return; } SNWindow.CreateWindow(windowRect, windowTitle); normalButtonID = SNGUI.DrawGuiItemsGroup(ref commands); toggleButtonID = SNGUI.DrawGuiItemsGroup(ref toggleCommands); daynightTabID = SNGUI.DrawGuiItemsGroup(ref daynightTab); weatherTabID = SNGUI.DrawGuiItemsGroup(ref weatherTab); categoriesTabID = SNGUI.DrawGuiItemsGroup(ref categoriesTab); if (currentTab == 0) { scrollviewID = SNScrollView.CreateScrollView(scrollRect, ref scrollPos, ref scrollItemsList[currentTab], "Select Item in Category:", categoriesTab[currentTab].Name, MAXSHOWITEMS); vehicleSettingsID = SNGUI.DrawGuiItemsGroup(ref vehicleSettings); SNHorizontalSlider.CreateHorizontalSlider(sliders[0].Rect, ref seamothSpeedMultiplier, 1f, 5f, sliders[0].Name, sliders[0].OnChangedEvent); SNHorizontalSlider.CreateHorizontalSlider(sliders[1].Rect, ref exosuitSpeedMultiplier, 1f, 5f, sliders[1].Name, sliders[1].OnChangedEvent); SNHorizontalSlider.CreateHorizontalSlider(sliders[2].Rect, ref hoverbikeSpeedMultiplier, 1f, 5f, sliders[2].Name, sliders[2].OnChangedEvent); } else { scrollviewID = SNScrollView.CreateScrollView(scrollRect, ref scrollPos, ref scrollItemsList[currentTab], "Select Item in Category:", categoriesTab[currentTab].Name); } }
private void EditWindow_OnGUI() { SNWindow.CreateWindow(EditWindow_Rect, "Edit Window"); ScrollView_editmode_event = SNScrollView.CreateScrollView(new Rect(EditWindow_drawRect.x + 5, EditWindow_drawRect.y, EditWindow_drawRect.width - 10, 168), ref scrollpos_editmode, ref guiItems_editmode, "Current mode:", EDIT_MODE[current_editmode_index], 7); SNHorizontalSlider.CreateHorizontalSlider(new Rect(EditWindow_drawRect.x + 5, EditWindow_drawRect.y + 200, EditWindow_drawRect.width - 10, 35), ref scaleFactor, 0.01f, 1f, "Scale Factor:", onScaleFactorChanged); }