The following warnings occurred:
Warning [2] Undefined variable $awaitingusers - Line: 33 - File: global.php(779) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(779) : eval()'d code 33 errorHandler->error
/global.php 779 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 837 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 837 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 4950 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 4950 errorHandler->error
/global.php 837 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1394 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1394 errorHandler->error
/inc/functions.php 1349 fetch_forum_permissions
/printthread.php 83 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 174 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 174 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 179 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 179 errorHandler->error
Warning [2] Undefined variable $css_align - Line: 1147 - File: inc/class_parser.php PHP 8.1.27 (Linux)
File Line Function
/inc/class_parser.php 1147 errorHandler->error
/inc/class_parser.php 1174 postParser->mycode_parse_img
[PHP]   postParser->mycode_parse_img_callback2
/inc/class_parser.php 481 preg_replace_callback
/inc/class_parser.php 177 postParser->parse_mycode
/printthread.php 184 postParser->parse_message



High Frontier Forums
Difficulties detaching parts? - Printable Version

+- High Frontier Forums (http://highfrontier.com/forum)
+-- Forum: General (http://highfrontier.com/forum/forumdisplay.php?fid=1)
+--- Forum: Dev Log (http://highfrontier.com/forum/forumdisplay.php?fid=15)
+--- Thread: Difficulties detaching parts? (/showthread.php?tid=193)



Difficulties detaching parts? - JoeStrout - 12-09-2016

The UI for attaching and detaching parts in design mode has been a bit of a thorn in our side from the very beginning.  In particular, detaching parts has always been harder than it should be.

We knew what we wanted: to disconnect two parts, you grab one and drag it "away" from the other.  To move them as a unit, you drag in any other direction.  The goal is to let you grab, say, half of a stack of parts, separate it from the other half, and put it somewhere else.  Sounds simple, right?

Unfortunately, defining what "away" means precisely enough to code has proved troublesome.  Even we got confused about it sometimes, and resorted to just deleting and re-creating a sticky part.

I think we have finally fixed this!

Today we sat down and really worked through it carefully.  The problem was really one of asymmetrical situations, like this:


[Image: gibaxzf.png]


Here, dragging the highlighted box to the right would separate the two parts, but dragging the tube to the left would not.  This example may look a bit contrived, but the same sort of situation comes up fairly often with things like solar panels and comm dishes.

But now we've extended the code to handle just this sort of thing!  You can now separate these parts by grabbing either one, and dragging in any direction that could be considered "away" from the other part.  So grab the box, and drag to the right or up, and they pop apart.  Grab the tube, and drag it down or to the left, and again they disconnect.  Drag in any other direction, and they move as a unit.

We spent some time loading a bunch of complex designs from our test games, and dragging things around.  I'm happy to say that the feeling here is sheer delight; not once did we find a case where parts were stuck stubbornly together, or where they fell apart unexpectedly.

Coming soon in version 0.26... we can't wait to hear what you think of this!