r/howdidtheycodeit • • Mar 01 '21

Question VSCode/Unity tabs system

In both these programs you can open multiple tabs (like multiple tabs with different code for each) and move them around the screen not freely, but based on the other tabs, like drag and dropping a new tab over the right half of another one will divide the view of the program in two resizable halves. How can I recreate the feature? I was thinking about using the mouse position when dragging a tab to determine where and how I should create the division, but I was wandering if there is some better way to do this.
(I apologize if this isn't understandable, I have no idea about how to refer to this feature.)

31 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/Scabbard18 Mar 01 '21

I'm not developing the current project with unity (I'm using electron), but the links to the github will prove useful nonetheless, as I can see how they both implemented it