mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-14 00:58:51 +02:00
InputConfigDiag: Use "..." for complicated expressions
The full expression is quite often too big for a simple button label, so encourage people to use the full editor to edit it.
This commit is contained in:
@ -209,6 +209,7 @@ public:
|
||||
virtual ~ExpressionNode() {}
|
||||
virtual ControlState GetValue() { return 0; }
|
||||
virtual void SetValue(ControlState state) {}
|
||||
virtual bool IsComplicated() { return false; }
|
||||
virtual operator std::string() { return ""; }
|
||||
};
|
||||
|
||||
@ -230,6 +231,11 @@ public:
|
||||
control->ToOutput()->SetState(value);
|
||||
}
|
||||
|
||||
virtual bool IsComplicated()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual operator std::string()
|
||||
{
|
||||
return "`" + (std::string)qualifier + "`";
|
||||
@ -276,6 +282,11 @@ public:
|
||||
rhs->SetValue(value);
|
||||
}
|
||||
|
||||
virtual bool IsComplicated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual operator std::string()
|
||||
{
|
||||
return OpName(op) + "(" + (std::string)(*lhs) + ", " + (std::string)(*rhs) + ")";
|
||||
@ -318,6 +329,11 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool IsComplicated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual operator std::string()
|
||||
{
|
||||
return OpName(op) + "(" + (std::string)(*inner) + ")";
|
||||
@ -361,6 +377,7 @@ public:
|
||||
expr = new Expression();
|
||||
expr->expr = expr_node;
|
||||
expr->num_controls = CountNumControls();
|
||||
expr->is_complicated = expr_node->IsComplicated();
|
||||
*expr_out = expr;
|
||||
|
||||
return EXPRESSION_PARSE_SUCCESS;
|
||||
|
Reference in New Issue
Block a user