egofree
|
|
Reply #30 Posted on: July 27, 2014, 03:17:02 am |
|
|
Joined: Jun 2013
Posts: 601
|
I've finished to fix the undo. I had already the same problem when moving a single instance and it's very strange : before moving every instance, it must be selected in the list of the left panel : for (Instance instance : room.instances) { roomFrame.oList.setSelectedValue(instance,true); roomFrame.fireObjUpdate(); Point newPosition = new Point(instance.getPosition().x - horizontalShift, instance.getPosition().y - verticalShift); instance.setPosition(newPosition); }
It doesn't seem very clean, but this is the only working solution i've found so far. (Firing the object update or tile update is not sufficient) .If you don't do this, all instances will be messed up if you use the undo with others commands, like deleting or moving a single instance. This means also that the undo will be much slower for shifting, but i don't think it's a big problem. For a room with thousands of objects, it will take something like 2 seconds instead of 0.5 second. Here is the latest version of LateralGm : https://dl.dropboxusercontent.com/u/29802501/lateralgm.jar
|
|
« Last Edit: July 27, 2014, 03:37:43 am by egofree »
|
Logged
|
|
|
|
|
egofree
|
|
Reply #32 Posted on: July 27, 2014, 05:21:31 am |
|
|
Joined: Jun 2013
Posts: 601
|
I added the delete instances button : I didn't implement the undo, but the user is informed that the undo is not available. But is 'It can't be undone' correct ? I sent an email to IsmAvatar for asking her is she has any ideas about optimizing the undo, and then i will make a pull request. Edit: The message will be updated also : i will not use the objects word but instances.
|
|
« Last Edit: July 27, 2014, 05:24:57 am by egofree »
|
Logged
|
|
|
|
|
egofree
|
|
Reply #34 Posted on: July 28, 2014, 01:40:16 pm |
|
|
Joined: Jun 2013
Posts: 601
|
I made a pull request for global shifting and deleting of instances and tiles. I merged the pull request into the main repository of LateralGm. IsmAvatar was kind and gave me the role of collaborator. This means i don't need anymore others permission for my pull requests. That's very useful as anyway there is nobody now who has enough time to review my pull requests for LateralGm (Of course i would be pleased to have some code review of my pull requests). When deleting instances, i display the following message : Are you sure you want to delete all instances ? All data will be lost I've found also that during global shifting, each piece must be selected in the list. I still don't know why. This means that it's slower, but as i said before it's not a big deal, as it takes about 2 seconds for a room with thousands of objects.
|
|
« Last Edit: July 28, 2014, 01:43:42 pm by egofree »
|
Logged
|
|
|
|
Goombert
|
|
Reply #35 Posted on: July 28, 2014, 07:14:33 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
"Instance" is GM and ENIGMA is defined quite precisely. There is no such thing as "Tile instance" or something like that. Objects are something different from instances. So "Shift all objects" is not correct from the terminology standpoint. So I personally would like "Shift all instances" and "Shift all tiles". But that's just me. Not necessarily, Studio and YYG as well as I, Robert, use instance colloquially to define anything indexed. Their manual promulgates it mostly, I can't find an example right at the moment but I know I have seen it before.
|
|
|
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.
|
|
|
|
|
|
|
Goombert
|
|
Reply #40 Posted on: July 29, 2014, 06:26:43 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
While I agree with you Harri you are misinterpreting my motivation, I would prefer tiles be called simply "Tiles" in the room editor and not "Tile Instances" just as I would prefer "Instances" as opposed to "Objects" or "Objects Instances"
Hope that clarifies.
|
|
|
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.
|
|
|
|
egofree
|
|
Reply #42 Posted on: July 30, 2014, 02:23:15 am |
|
|
Joined: Jun 2013
Posts: 601
|
I don't intend to change anything, but it seems to me that it's inconsistent in GM studio. You have resources, displayed in the left panel, and you have resources instances in a room. For shifting objects and tiles, GM Studio displays the following message : Shift all instances by a given amount Shift all tiles by a given amount But if we want to be consistent, we should have : Shift all object instances by a given amount Shift all tile instances by a given amount Or Shift all objects by a given amount Shift all tiles by a given amount Anyway for me it's not so important, and it will not prevent me from sleeping !
|
|
« Last Edit: July 30, 2014, 03:23:37 am by egofree »
|
Logged
|
|
|
|
|
egofree
|
|
Reply #44 Posted on: July 30, 2014, 06:40:42 am |
|
|
Joined: Jun 2013
Posts: 601
|
As i proposed before, i modified the way objects are selected : - Left button : add an object when there is no objects, and move otherwise - Left button + ctrl : always add an object (useful when you want to add an object on top of another one) - Left button + shift : add multiple objects (no change) The right button deletes objects, it's the same. The commands in the rooms editor are identical now to GM. I think it's better than before. Here is the latest version of LateralGm : https://dl.dropboxusercontent.com/u/29802501/lateralgm.jar
|
|
« Last Edit: July 30, 2014, 06:42:36 am by egofree »
|
Logged
|
|
|
|
|