Pages: « 1 2 3 4 5 6 7 8 9 »
  Print  
Author Topic: Improving rooms editor  (Read 45794 times)
Offline (Unknown gender) egofree
Reply #105 Posted on: December 23, 2014, 04:57:04 am
Contributor
Joined: Jun 2013
Posts: 601

View Profile Email
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 :

« Last Edit: December 23, 2014, 07:30:48 am by egofree » Logged
Offline (Male) Goombert
Reply #106 Posted on: December 23, 2014, 05:03:52 am

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
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!  (Y)
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) egofree
Reply #107 Posted on: December 23, 2014, 05:09:50 am
Contributor
Joined: Jun 2013
Posts: 601

View Profile Email
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!  (Y)

I am not bored, i have a lot of fun doing it. :D 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.
« Last Edit: December 25, 2014, 04:29:18 pm by egofree » Logged
Offline (Unknown gender) egofree
Reply #108 Posted on: December 25, 2014, 01:08:33 pm
Contributor
Joined: Jun 2013
Posts: 601

View Profile Email
LateralGM has now three different states in the rooms editor : single object selection (the default), region selection and a pasting mode. I added a new toggle button in the toolbar in order to activate the single object selection. This is needed when we are in pasting mode and we want to go back in single object selection. The copy and paste functions are almost done. I need to do more tests and i will make a new pull request.

Logged
Offline (Male) Goombert
Reply #109 Posted on: December 25, 2014, 03:58:44 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
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).
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) TheExDeus
Reply #110 Posted on: December 25, 2014, 06:13:25 pm

Developer
Joined: Apr 2008
Posts: 1860

View Profile
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.
Logged
Offline (Male) Goombert
Reply #111 Posted on: December 25, 2014, 08:09:23 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
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.
« Last Edit: December 25, 2014, 08:13:46 pm by Robert B Colton » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) egofree
Reply #112 Posted on: December 26, 2014, 05:26:44 am
Contributor
Joined: Jun 2013
Posts: 601

View Profile Email
I've finished to implement the cut, copy and paste functions, and i made a new pull request : https://github.com/IsmAvatar/LateralGM/pull/192.
Logged
Offline (Male) Goombert
Reply #113 Posted on: December 26, 2014, 06:49:18 am

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
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_LateralGM
http://enigma-dev.org/docs/Wiki/Room_Editor
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) egofree
Reply #114 Posted on: December 26, 2014, 06:58:55 am
Contributor
Joined: Jun 2013
Posts: 601

View Profile Email
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.
« Last Edit: December 26, 2014, 07:08:01 am by egofree » Logged
Offline (Male) Goombert
Reply #115 Posted on: December 26, 2014, 07:33:24 am

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
Also, I've found another bug as well, you forgot to include a version of the new icons for the contrast icon pack. So these icons are missing under that icon pack now which breaks the dark theme. These icons need vectorized anyways, post a request for Josh to SVG them for Calico, he will make them less aliased.
https://github.com/enigma-dev/Calico-Icon

« Last Edit: December 26, 2014, 07:35:29 am by Robert B Colton » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) egofree
Reply #116 Posted on: December 26, 2014, 11:19:29 am
Contributor
Joined: Jun 2013
Posts: 601

View Profile Email
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.
« Last Edit: December 26, 2014, 11:50:04 am by egofree » Logged
Offline (Male) Goombert
Reply #117 Posted on: December 26, 2014, 08:57:21 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
All of these caveats would best be documented on the Wiki page I linked you to. Instead of repeating the same instructions over and over again, just write them on the Wiki and then share the link to anybody who needs to know. Also so you don't forget either.

http://enigma-dev.org/docs/Wiki/Room_Editor
http://enigma-dev.org/docs/Wiki/Working_with_LateralGM
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) egofree
Reply #118 Posted on: December 27, 2014, 04:45:35 am
Contributor
Joined: Jun 2013
Posts: 601

View Profile Email
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 ?
Logged
Offline (Male) Goombert
Reply #119 Posted on: December 27, 2014, 08:06:52 am

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
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
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Pages: « 1 2 3 4 5 6 7 8 9 »
  Print