Code Monkey home page Code Monkey logo

customshapebutton's Introduction

๐Ÿ”˜๏ธ Custom Shape Button

The Custom Shape Button plugin revolutionizes the way buttons are designed in Unreal Engine. Traditionally, the Unreal Engine restricts you to creating buttons with only rectangular forms. This limitation, however, is eliminated by our plugin.

With the Custom Shape Button plugin, you can now create buttons of any shape or form you envision. Whether you want a circular button, a star-shaped one, or one in the shape of a custom image, this plugin allows you to bring that vision to life. Additionally, the plugin ensures the hover and press behavior works flawlessly with the custom shapes, ensuring a seamless user experience.

CustomShapeButton

๐Ÿ“š Documentation

Detailed documentation about the Custom Shape Button can be found here.

๐ŸŽ“ Sample Projects

Check out our Release page for a sample project showcasing the Custom Shape Button plugin.

๐Ÿ“… Changelog

2024-04-25

  • Updated to Unreal Engine 5.4
  • Implemented Materials Support as alternative to textures: doc:

image

2023-10-21

  • Updated to Unreal Engine 5.3.

2023-06-04

  • ๐ŸŽ‰ Initial public release on Unreal Engine 5.2

๐Ÿ“ซ Feedback & Contribution

Feedback and contributions from the community are highly appreciated!

If you'd like to contribute, please fork the project and create a pull request targeting the develop branch.

If you've found a bug or have an idea for a new feature, please open a new issue on GitHub. Thank you!

๐Ÿ“œ License

This project is licensed under the terms of the MIT license. See LICENSE for more details.

We hope you find this plugin useful and we look forward to your feedback and contributions.

customshapebutton's People

Contributors

janseliv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

customshapebutton's Issues

random crash with this plugin

Hi, your plugin is great and functions perfectly in most cases.

However, I just encountered some random crashes of the editor. When testing in PIE, sometimes, when mouse over my partly transparent hexagon shape button (using texture, not material), the engine just crashes, but when I restart the engine and test multiple times it does not reoccur, and a few hours later it crashes again. This gives me no confidence, not sure if it will crash in build. If you could kindly take a look if this is something in the code?

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000000addc3

UnrealEditor_CustomShapeButton!SCustomShapeButton::IsAlphaPixelHovered() [C:\...\Plugins\CustomShapeButton-main\Source\CustomShapeButton\Private\SCustomShapeButton.cpp:179]
UnrealEditor_CustomShapeButton!TBaseSPMethodDelegateInstance<1,SCustomShapeButton const ,1,bool __cdecl(void),FDefaultDelegateUserPolicy>::Execute() [C:\...\UE_5.4\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:281]
UnrealEditor_CustomShapeButton!SlateAttributePrivate::TSlateAttributeBase<SWidget,bool,SlateAttributePrivate::FSlateAttributeNoInvalidationReason,TSlateAttributeComparePredicate<TEqualTo<void> >,0>::FSlateAttributeGetterWrapper<SlateAttributePrivate::TSlateA() [C:\...\UE_5.4\Engine\Source\Runtime\SlateCore\Public\Types\Attributes\SlateAttributeBase.inl:585]
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
more UnrealEditor_SlateCore here

I noticed that in SCustomShapeButton.cpp around line 179, you did check IsValidIndex, but in my case, exception access violation still triggers.

Does this have anything to do with multiple buttons close to each other and potentially overlap? My hex-shape buttons form a hex grid pattern.

p.s. I just checked the other closed issue and verified:
texture: NoMipmaps
texture group: UI
never stream
compression: vector displacement map RGBA8
and texture size 444*512, power of 2.

Any suggestions?

Thanks,

Plugin not working at all in UE 5.3.2

Hi! I watched the tutorial on how to use your plugin and added it to my project but the widget is not working clicking on it does not do anything at all.. tried debugging with print string too still nothing at all...

Support for unreal engine version 4.23 because of HTML exporting

Hello, I really really really like your plugin. It is a game changer for me. Can You please somehow add support to version 4.23 because I am working on one project that needs to go to the web and 4.23 is the last version supported for HTML exporting. I was trying to do it my self by updating your code but constantly getting some errors. I am also not good with C++ coding so that is also a reason why.
I thank You in advance and greet You warmly :)

Engine crashes when using a texture with high resolution

So i was using the plugin and i had set all the textures correctly with the correct parameters but the engine kept crashing with this error:
[UnrealEditor CustomShape Button!SCustomShape Button::UpdateRawColors_Texture'::2'::<lambda_1>::operator()() [D:\UnrealProjects\CustomShapeButtonSample_UE5-4\Plugins\CustomShapeButton\Source\CustomShapeButton\Private\SCustomShapeButton.cpp:240] UnrealEditor_CustomShapeButton!UE::Core::Private::Function::TFunctionRefCaller<SCustomShapeButton::UpdateRawColors_Texture'::2'::<lambda_1>,void __cdecl(FRHICommandL]

After a lot of testing i have figured out that the problem was that the texture resolution was too high(1080x1080). I have fixed the issue by resizing the texture to 256x256.
I figured i should post this in case someone else had the same issue with this plugin and also because this wasn't mentioned in the documentation.

Trouble using with materials instead of images

I'm trying several things here to use this with some materials instead of an image so that I can stitch together button icons at run time instead of modifying every single icon.

So. The button works if I use the hex image.
image

I then use this same image to try and mask a material:
image

And then set this as the brush image:
image

And it doesn't detect any hit testing ๐Ÿ˜ข

I can see that it's this chunk right here relying on a Texture2D but not being able to use a material. https://github.com/JanSeliv/CustomShapeButton/blob/main/Source/CustomShapeButton/Private/SCustomShapeButton.cpp#L157

Any guidance?

CommonUI Support

Hello, and thanks for the great work!
Bychance, have you tested it with CommonUI?
It feels like having UCommonButtonInternalBase inherit from your class instead of UButton should be enough, and would be a great feature to use!

Hover and click not working properly

Hi all,
first of all, I love this plugin, since it does exactly what I was looking for!

I closely followed the tutorial in this video: Custom Shaped Button UE5
Unfortunately, my button does not work as expected. When hovering nothing happens (even though the button should turn red) and only when I hold down the left mouse button and hover the actual hovering state is achieved. Consequently, this leads to not being able to trigger something upon a click event...

My Image has been set to UI, NoMipMaps and VectorDisplacementmap just as shown in the tutorial.

Do you have any idea on how to resolve this issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.