fix conversation dialog

This commit is contained in:
voffka81
2022-08-18 13:01:25 +03:00
parent edc8420eab
commit 80df6bde42
3 changed files with 65 additions and 45 deletions
@@ -15,15 +15,15 @@ public class ChoiceController : MonoBehaviour
// Update is called once per frame
public static ChoiceController AddChoiceButton(Button choiceButtonTemplate, KeyValuePair<string, BaseAction> option, int index)
{
int buttonSpacing = -44;
int buttonSpacing = -50;
Button button = Instantiate(choiceButtonTemplate);
button.transform.SetParent(choiceButtonTemplate.transform.parent);
button.transform.localScale = Vector3.one;
button.transform.localPosition = new Vector3(0, index * buttonSpacing, 0);
button.transform.localPosition = choiceButtonTemplate.transform.localPosition + new Vector3(0, index * buttonSpacing, 0);
button.name = option.Key;
button.gameObject.SetActive(true);
ChoiceController choiceController = button.GetComponent<ChoiceController>();
choiceController._option = option;
return choiceController;