Having a custom slider bar visual

Hi, I created a personnal slider bar for a widget blueprint. The problem being, when I insert my image for the custom slider bar, its way too thin and too little even thought the original image is not that little. And when I scale it, the result is pretty ugly. Is there anything I am doing wrong aand is there a specific way tio insert our image as the slider image?

Thanks

Did you set the image type to box, and then set up correct margins? If you don’t, then it’ll stretch things pretty poorly.

If you mean drawing as: No I tried at first as an Image, but I just tried the box type and it give pretty similar result

me too ,
this is design

this is actual show
image

have you fixed it?

It sounds like you’re facing an issue with scaling and displaying your custom image for the slider in your widget blueprint. Here are a few things to check and suggestions to help you resolve the problem:

  1. Image Aspect Ratio: Make sure that your custom slider image has the correct aspect ratio for how you want it to appear on the slider. If the image is distorted when scaled, it may be because the aspect ratio of the image doesn’t match the slider’s dimensions. If necessary, you can adjust the image’s aspect ratio in an image editor before importing it.
  2. Set the Correct Image Type: In Unreal Engine, make sure the image you’re using is properly imported as a “User Interface” texture (i.e., a texture that’s set up for UI elements). This ensures it’s optimized for display in UMG (Unreal Motion Graphics).
  3. Slider Fill and Handle Settings:
  • The slider widget has two main elements: the Fill (the bar background) and the Handle (the movable part). You may need to modify both.
  • For your custom image, you’ll want to adjust the Handle (the draggable part) to ensure the image fits nicely on the slider.
  • You can scale the fill part or handle directly from the Style section in the slider widget. Ensure you are applying the image to the correct part (handle vs. fill).
  1. Using the Image as a Material: Sometimes using the image as a material applied to a plane or a UMG “Image” widget can give you more control over scaling and appearance. You can create a simple material with your image and then apply it to your slider.
  2. Texture Settings:
  • Check the Texture Group of your image in the Texture Editor. For UI purposes, it should be set to “UI” rather than something like “World”. This helps Unreal Engine treat it correctly for UI scaling and resolution.
  • Ensure the Compression Settings are set to TC_EditorOnly or TC_UI to keep it crisp when used in a widget.
  1. Size Box: If your slider image is too small, consider using a Size Box around the slider to enforce the proper width and height for the image. This can prevent unwanted stretching and ensure your image appears at the correct size without distortion.
  2. Scaling the Slider: Instead of scaling the image directly, consider scaling the entire slider widget. You can adjust the width/height of the slider widget container to fit your image correctly, rather than relying solely on the image scale property.

Summary:

To avoid distortion and scaling issues:

  • Ensure the image has the right aspect ratio and resolution.
  • Use the correct slider elements for the fill and handle, and adjust the image in the Style settings of the slider widget.
  • Consider using a Size Box or modifying the overall dimensions of the slider widget to prevent the image from being scaled incorrectly.

By following these steps, you should be able to insert and display your custom slider image more effectively without it becoming too small or distorted.