def test_ui_range_slider(interactive=False): range_slider_test_horizontal = ui.RangeSlider(shape="square") range_slider_test_vertical = ui.RangeSlider(shape="square", orientation="vertical") if interactive: show_manager = window.ShowManager(size=(600, 600), title="FURY Line Double Slider") show_manager.scene.add(range_slider_test_horizontal) show_manager.scene.add(range_slider_test_vertical) show_manager.start()
def test_ui_range_slider(interactive=False): range_slider_test = ui.RangeSlider(shape="square") if interactive: show_manager = window.ShowManager(size=(600, 600), title="FURY Line Double Slider") show_manager.scene.add(range_slider_test) show_manager.start()
value = slider.value cube.SetPosition(value, 0, 0) line_slider.on_change = translate_cube ############################################################################### # Range Slider # ============ # # Finally, we can add a range slider. This element is composed of two sliders. # The first slider has two handles which let you set the range of the second. range_slider = ui.RangeSlider( line_width=8, handle_side=25, range_slider_center=(550, 450), value_slider_center=(550, 350), length=250, min_value=0, max_value=10, font_size=18, range_precision=2, value_precision=4, shape="square") ############################################################################### # Select menu # ============ # # We just added many examples. If we showed them all at once, they would fill # the screen. Let's make a simple menu to choose which example is shown. # # We'll first make a list of the examples. examples = [[rect], [disk, ring], [img], [panel], [ring_slider, line_slider], [range_slider]]
from fury import ui, window range_slider_hor = ui.RangeSlider(line_width=8, handle_side=25, range_slider_center=(200, 500), value_slider_center=(200, 400), length=250, min_value=0, max_value=10, font_size=18, range_precision=2, value_precision=4, shape="square") range_slider_ver = ui.RangeSlider(line_width=8, handle_side=25, range_slider_center=(475, 450), value_slider_center=(375, 450), length=250, min_value=0, max_value=10, font_size=18, range_precision=2, value_precision=4, orientation="vertical", shape="square") current_size = (800, 800) show_manager = window.ShowManager(size=current_size, title="Range Sliders Example") show_manager.scene.add(range_slider_hor)
line_slider_x.on_change = translate_cube_x line_slider_y.on_change = translate_cube_y ############################################################################### # Range Slider # ============ # # Finally, we can add a range slider. This element is composed of two sliders. # The first slider has two handles which let you set the range of the second. range_slider_x = ui.RangeSlider(line_width=8, handle_side=25, range_slider_center=(450, 450), value_slider_center=(450, 350), length=150, min_value=0, max_value=10, font_size=18, range_precision=2, value_precision=4, shape="square") range_slider_y = ui.RangeSlider(line_width=8, handle_side=25, range_slider_center=(750, 400), value_slider_center=(650, 400), length=150, min_value=0, max_value=10, font_size=18, range_precision=2,