yasirkula / unitydynamicpanels Goto Github PK
View Code? Open in Web Editor NEWDraggable, resizable, dockable and stackable UI panel solution for Unity 3D
License: MIT License
Draggable, resizable, dockable and stackable UI panel solution for Unity 3D
License: MIT License
Right now all Panels are draggable. It would be nice to have a checkbox to easily disable dragging on Panels.
Right now the only way to customize the style of panels and tabs is to change the prefabs provided with the plugin. It would be nice to provide a custom Panel or Tab prefab directly in the Canvas inspector so plugin consumers can provide their own tab styles.
Right now tabs are always listed from left to right on the top of the canvas. It would be nice to have the ability to have tabs listed on the side and set which corner they start from.
Is there a way to maximize panel?
Right now there is not a way to see the final layout at Edit time, you have to run to see it constructed. It would be nice to have a the Canvas automatically build the Panels as the settings are being tweaked or at a minimum a button in the Canvas inspector to build the layout so you can see what it will look like without running.
Ability to hide entire Panels and have them slide in and out.
If the Canvas parent has its initial size set to something else than full (see RectTransform), it gets resized on runtime setup to something that has an unwanted offset depending on the fullsize-delta before playmode:
https://imgur.com/a/O9JA2eq
Amazing asset, especially for the price of free!
Would love to have an option to hide the tab header for panels that have only one tab. It would be much more pleasing to the eye. I guess it might be kind of a layout headache to do so, but would greatly appreciate it.
Thanks!
This plugin solved my big problem
This issue is pretty widespread. In the resizing logic you're doing this a lot:
float flexibleWidth = newSize.x - element.Size.x;
if(flexibleWidth > MIN_SIZE_TOLERANCE)
Which is supposed to check if our size delta is sufficiently large to warrant a change. However, this does not account for when flexibleWidth is negative... meaning you effectively can't shrink a panel using ResizeElementTo. It should check absolute value when doing this comparison. Here's my solution:
private const float MIN_SIZE_TOLERANCE = 1E-4f;
protected bool OutsideMinSizeTolerance(float f)
{
return Mathf.Abs(f) > MIN_SIZE_TOLERANCE;
}
Seems a bit silly, but in Unity, you can close panels by right clicking them and clicking "Close Tab" or the "X" button.
It's great that you can already do this using PanelTab.Destroy()
, but a in-built "X" button would be nice.
Other than that, really well done in terms of ease of going from a random RectTransform
to a panel managed by your system.
OnPanelClosed and OnTabClosed works globally for all panels/tabs.
I would love to be able to define different delegate methods for different tabs. This way I could specify individual behavior on close or even make some tabs closeable and others not.
Sadly I'm not experienced with C# delegates so I'm having a hard time thinking of a workaround that works for me.
Thanks for this great Plugin!
I'm making some pretty substantial changes to this code and I can't for the life of me figure out what the purpose of the InternalSettings
design pattern is. From what I can tell it mostly just contains passthrough functions for the owning class. Why oh why is it written like this? Where did the idea come from? What does it accomplish?
There are two tabs in my docked panel, I want to disable the header of each tab or forbid it to generate, how can I achieve this without code? thanks a lot!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.