UI: various changes

* View2D to region now returns ints instead of shorts.
* Use "Numpad" instead of "Pad" in automatic keymap menu info.
* Menus can now use buttons other than BUTM and SEPR, in
  particular TOG and ROW are now supported instead of flipping
  bits manually.
* Added a simpler uiDefMenu* api for making menus now, and it
  only supports Operator and RNA buttons at the moment, will be
  used in next commit. Not sure how this will evolve .. makes
  menu code look cleaner anyways.
* Ensure that interface code doesn't crash when getting unknown
  Operators and RNA properties, and display their buttons grayed
  out in that case.
This commit is contained in:
2009-01-15 04:13:38 +00:00
parent ad50055610
commit f08032e8f9
14 changed files with 267 additions and 154 deletions

View File

@@ -244,7 +244,7 @@ void projectIntView(TransInfo *t, float *vec, int *adr)
//uvco_to_areaco_noclip(v, adr);
}
else if(t->spacetype==SPACE_IPO) {
short out[2] = {0.0f, 0.0f};
int out[2] = {0, 0};
UI_view2d_view_to_region((View2D *)t->view, vec[0], vec[1], out, out+1);
adr[0]= out[0];