Change mjVISSTRING of connect and weld equality constraints from "Constraint" to "Equality". This is more consistent with the 'E' shortcut key and with mjDISABLESTRING ("constraint" means all constraints, "equality" means bilateral constraints).

Also remove unused ampersands from `mjVISSTRING` names, these are a remnant from a very old version of the UI framework.

PiperOrigin-RevId: 593469811
Change-Id: I0f6f73c9f5d2c61b2280f395f76434b0710ce4f3
This commit is contained in:
Yuval Tassa
2023-12-24 12:06:05 -08:00
committed by Copybara-Service
parent 2a46ca3787
commit 4c066a26b5
3 changed files with 22 additions and 26 deletions
+4 -8
View File
@@ -837,15 +837,8 @@ void MakeRenderingSection(mj::Simulate* sim, const mjModel* m, int oldstate) {
{mjITEM_END}
};
for (int i=0; i<mjNVISFLAG; i++) {
// set name, remove "&"
// set name
mju::strcpy_arr(defFlag[0].name, mjVISSTRING[i][0]);
for (int j=0; j<strlen(mjVISSTRING[i][0]); j++) {
if (mjVISSTRING[i][0][j]=='&') {
mju_strncpy(
defFlag[0].name+j, mjVISSTRING[i][0]+j+1, mju::sizeof_arr(defFlag[0].name)-j);
break;
}
}
// set shortcut and data
if (mjVISSTRING[i][2][0]) {
@@ -868,7 +861,10 @@ void MakeRenderingSection(mj::Simulate* sim, const mjModel* m, int oldstate) {
// add rendering flags
mjui_add(&sim->ui0, defOpenGL);
for (int i=0; i<mjNRNDFLAG; i++) {
// set name
mju::strcpy_arr(defFlag[0].name, mjRNDSTRING[i][0]);
// set shortcut and data
if (mjRNDSTRING[i][2][0]) {
mju::sprintf_arr(defFlag[0].other, " %s", mjRNDSTRING[i][2]);
} else {