egofree
 Joined: Jun 2013
Posts: 601
|
 |
Reply #105 Posted on: December 23, 2014, 09:57:04 AM |
|
|
I started to implement the copy and paste functions. I added three new buttons in the rooms editor : cut, copy and paste. They can be called with the standard keyboard shortcuts : ctrl-x, ctrl-c and ctrl-v. To give an example, let's say that you want to copy a region in the room. First, you click on the selection tool and select the region to copy :  Then you do an ctrl-c (copy) and a ctrl-v (paste). You have now a stamp :  And every time you click on the left button, the instances are pasted in the room : 
|
|
|
|
|
egofree
 Joined: Jun 2013
Posts: 601
|
 |
Reply #107 Posted on: December 23, 2014, 10:09:50 AM |
|
|
Quote from: Robert B Colton on December 23, 2014, 10:03:52 AM Haha that's awesome egofree you're saving me the work, really awesome to have someone else helping with LateralGM. If you get bored you don't have to finish I can pick up any unfinished tasks for you as well. Once this is complete we can also get a new Portable ZIP out, as I said I like to update it about every 10 or so LGM features/fixes. Are you planning to link the selection with the list selection? If not I think we should discuss that aspect of this because it may need done again because of the sorting that I am planning to work on, unless of course you end up doing that too. Regardless, keep up the great work ego! 
I am not bored, i have a lot of fun doing it.  I am not planning to link the selection with the list selection. Right now, i have to figure out how to display only instances or tiles in the 'stamp'. I think we should select only instances or tiles when we are doing a copy and paste. It is not complicated to select instances or tiles in memory, but the class RoomVisual, which is dealing with the display, is not making any difference between instances and tiles.
|
|
|
|
|
Goombert
 Joined: Jan 2013
Posts: 2,991
|
 |
Reply #109 Posted on: December 25, 2014, 08:58:44 PM |
|
|
|
Nice work so far egofree, when you're done then I will pull your changes and make an LGM release and if that goes well I'll update the Portable ZIP with some recent compiler fixes for alarms by me and instance activation by sorlok which you reported (and saw that he fixed too).
|
|
|
TheExDeus
 Joined: Apr 2008
Posts: 1,860
|
 |
Reply #110 Posted on: December 25, 2014, 11:13:25 PM |
|
|
|
I would want a way to merge projects together, but in controlled way. Like I need to take 10 sprites from one project and add it to another. This is especially useful now with things like GUI's, for which I constantly need to import 20 sprites in every project. There is a "Package" button, but neither Export, nor Import works there. And it allows exporting and importing whole groups of resources, not individual ones. I remember having this feature in GM, but can't remember how it worked. I think it just took two projects and made them one.
|
|
|
Goombert
 Joined: Jan 2013
Posts: 2,991
|
 |
Reply #111 Posted on: December 26, 2014, 01:09:23 AM |
|
|
TheExDeus, I designed the package interface similar to GM's but in a way that lets you control all installed resources types in LGM. The reason it doesn't work is because it is just supposed to run the read/write routines and pass them the resource types they are allowed or not allowed to write/read. The reason this hasn't progressed is because it is really really hard to do with the GMK reader, the GMX and EGM readers/writers can be broken down to handle a single resource at a time which allows us to abstract how we merge the projects together to make it one interface for all formats. So basically, it is the GMK format that is stopping this feature from progressing. That said, GM8.1 had a funky way of importing single resources, it used a special binary format for each resource, which is likely just GMK but we don't know how each one is formatted, IsmAvatar apparently hasn't investigated and I am unaware of any available documentation on it. They were all essentially the gmres format or whatever which was an adaptation of the GMK format. Studio has the GMX format now which can obviously be easily abstracted to let you handle single resources at a time so they have added import/export buttons in the main tree context menu. If I click the "Add Existing Sound" button it will display an open dialog with the *.sprite.gmx filter. To do this in LGM requires abstracting the GMX readers/writers in a way that allows it to handle singletons which I haven't done largely because of a lack of sufficient feedback on design and implementation.  Ceteris paribus, this is also off topic, let's keep this topic focused on the room editor and its transferability, resource importing/exporting/merging is beyond the scope of this topic.
|
|
|
|
|
Goombert
 Joined: Jan 2013
Posts: 2,991
|
 |
Reply #113 Posted on: December 26, 2014, 11:49:18 AM |
|
|
I've pulled and tested and everything seems to work out pretty good. I've caught a small minor visual bug however, notice the one object is less opaque than the others? It's as if it's above the selection. I don't have steps to reproduce, I was just clicking around, I did not change the depth or anything.  Since this is such a minor bug I've gone ahead and made a new quick release anyway so we can catch any other bugs or issues to resolve before putting it in a new portable. Also it would be really useful to have these shortcuts for the room editor documented on its wiki page. http://enigma-dev.org/docs/Wiki/Working_with_LateralGMhttp://enigma-dev.org/docs/Wiki/Room_Editor
|
|
|
egofree
 Joined: Jun 2013
Posts: 601
|
 |
Reply #114 Posted on: December 26, 2014, 11:58:55 AM |
|
|
|
For the bug, i am not sure, but perhaps it's for the following reason : when you are doing a paste, it makes a transparent image of the current selection (Alpha value 0.5f). If you copy instances which have already an alpha value, it will take into account this value in the image's selection only if it's more transparent than 0.5f. But when you are doing a paste (left click), it should not change anything.
|
|
|
|
|
egofree
 Joined: Jun 2013
Posts: 601
|
 |
Reply #116 Posted on: December 26, 2014, 04:19:29 PM |
|
|
Quote from: Robert B Colton on December 26, 2014, 12:33:24 PM post a request for Josh to SVG them for Calico, he will make them less aliased.
Done. Edit:I forgot to say that when you are pasting or filling a region, it will take into account the 'Delete underlying' setting.
|
|
|
|
|
egofree
 Joined: Jun 2013
Posts: 601
|
 |
Reply #118 Posted on: December 27, 2014, 09:45:35 AM |
|
|
|
Robert: You said you want to work on LateralGM and specially on the rooms editor. As i understand the user interface will be modified. Does it worth to document it now if it will be modified ?
|
|
|
Goombert
 Joined: Jan 2013
Posts: 2,991
|
 |
Reply #119 Posted on: December 27, 2014, 01:06:52 PM |
|
|
Yes because I don't plan on changing any of those shortcuts. I'm concerned with functional changes, my biggest irk is that you can't set the creation order that's all I really care to fix in the room editor besides bugs. On a side note, have you been adding the keyboard shortcuts to the properties file I added? That was a change I made a while back, you should use KeyStroke.getKeyStroke(Messages.getKeyboardString("")) https://github.com/IsmAvatar/LateralGM/blob/master/org/lateralgm/messages/keyboard.properties
|
|
|
|