Author Topic: Relative anchors greater then 1 causing editor bugs  (Read 4349 times)

greyhoundgames

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 39
    • View Profile
Relative anchors greater then 1 causing editor bugs
« on: January 07, 2015, 05:08:28 PM »
So in the past I could set anchors greater then 1.0 as a relative anchor in the editor. Like to get 4 buttons in a row i could anchor 3 of them to the left most one and have their positions be 1.1, 2.2, 3.3 etc and they would space out nicely. I recently updated my NGUI from a version circa 5 months ago and now when I try to enter any value greater then 1, the editor textfield greys out and refuses to let me edit it. It still works when you do this programatically.
  • add some widget
  • add another widget anchored to it
  • change the left anchor to current position
  • type in 1.5 and see if it greys out for you.

Any input would be appreciated.
« Last Edit: January 07, 2015, 05:32:55 PM by greyhoundgames »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Relative anchors greater then 1 causing editor bugs
« Reply #1 on: January 08, 2015, 08:41:57 AM »
You're right. Open up UIRectEditor.cs, find line 395 and 428 and comment them out:
  1. // Horizontal slider for relative values, for convenience
  2. //EditorGUI.BeginDisabledGroup(isOutside01);
  1. //EditorGUI.EndDisabledGroup();

greyhoundgames

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 39
    • View Profile
Re: Relative anchors greater then 1 causing editor bugs
« Reply #2 on: January 09, 2015, 10:42:02 AM »
Verified fixed, thanks so much!