private void TryUpdateValue() { bool canCalc = true; if (!m_DictId.HaveValue) { canCalc = false; } else { for (int i = 0; i < m_FormatArgs.Count; i++) { if (!m_FormatArgs[i].HaveValue) { canCalc = false; break; } } } if (canCalc) { m_HaveValue = true; object dictId = m_DictId.Value; ArrayList arglist = new ArrayList(); for (int i = 0; i < m_FormatArgs.Count; i++) { arglist.Add(m_FormatArgs[i].Value); } object[] args = arglist.ToArray(); m_Value = Dict.Format((string)dictId, args); } }
static public int Format_s(IntPtr l) { try { System.String a1; checkType(l, 1, out a1); System.Object[] a2; checkParams(l, 2, out a2); var ret = Dict.Format(a1, a2); pushValue(l, true); pushValue(l, ret); return(2); } catch (Exception e) { return(error(l, e)); } }
private void TryUpdateValue(StoryInstance instance) { if (m_DictId.HaveValue) { m_HaveValue = true; m_Value = null; string dictId = m_DictId.Value; ArrayList arglist = new ArrayList(); for (int i = 0; i < m_FormatArgs.Count; i++) { arglist.Add(m_FormatArgs[i].Value); } object[] args = arglist.ToArray(); m_Value = Dict.Format(dictId, args); } }
internal void HighlightPrompt(string id, params object[] args) { string info = Dict.Format(id, args); Utility.EventSystem.Publish("ui_highlight_prompt", "ui", info); }