{"id":1258,"date":"2010-05-11T23:42:02","date_gmt":"2010-05-11T12:42:02","guid":{"rendered":"http:\/\/www.vectorstorm.org\/?p=1258"},"modified":"2010-05-11T23:42:02","modified_gmt":"2010-05-11T12:42:02","slug":"more-on-the-left-bar","status":"publish","type":"post","link":"https:\/\/www.vectorstorm.com.au\/2010\/05\/11\/more-on-the-left-bar\/","title":{"rendered":"More on the left bar"},"content":{"rendered":"

Today I brought across the road-creation and NPC creation tools to the new UI system. \u00a0Went really smoothly and easily. \u00a0Very much looking forward to removing all the old custom code that was required for this stuff.<\/p>\n

I also brought across half of the terrain-painting functionality, which has been a little more tricky (and still isn’t quite complete). \u00a0The problem here is in how one interacts with the action bars. \u00a0From the end-user’s point of view, the action bars work by clicking a button to activate a function, and then clicking where you want that function to take place in the world. \u00a0Once you’ve done this, the function is turned off, and you need to click on the button again to do its function again. \u00a0This is pretty intuitive for buildings and roads.<\/p>\n

However, for painting on the terrain, you really want the buttons to act like a Photoshop-style toolbar, where you make a choice and that choice remains active until you select a different choice, no matter how many strokes you draw on the terrain. \u00a0Doing that is easy enough; \u00a0the problem is that right now, action bar buttons don’t have any sort of “toggle” functionality; \u00a0the only way to turn one off is for the button to automatically shut itself off (as, for example, the “place a building” ones do automatically after placing a building), or for the player to select a different button. \u00a0There’s currently no way for the player to intentionally deactivate a button without activating a different one.<\/p>\n

It seems like I’m going to need to add two more things to make this really robust:<\/p>\n

    \n
  1. “Toggle” functionality. \u00a0After being clicked, a button should stay hilighted until its function is used, or until it’s clicked again. \u00a0(At which point its function is disabled)<\/li>\n
  2. When an action bar is closed\/hidden, any button which is currently toggled on should be toggled off again.<\/li>\n<\/ol>\n

    Hopefully I can get these things sorted out tomorrow, plus get the rest of the terrain painting functionality converted over to the new system. \u00a0Once that’s done, I’ll be able to rip out huge amounts of terrible old code. \u00a0:)<\/p>\n","protected":false},"excerpt":{"rendered":"

    Today I brought across the road-creation and NPC creation tools to the new UI system. \u00a0Went really smoothly and easily. \u00a0Very much looking forward to removing all the old custom code that was required for this stuff. I also brought across half of the terrain-painting functionality, which has been a little more tricky (and still…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[24,25],"tags":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/po9WK-ki","_links":{"self":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/1258"}],"collection":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/comments?post=1258"}],"version-history":[{"count":0,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/1258\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/media?parent=1258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/categories?post=1258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/tags?post=1258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}