Changing "Number dialog options" in General Settings doesn't make any change(SOLVED)

Started by lapsking, Mon 30/01/2023 07:32:49

Previous topic - Next topic

lapsking

Hi, I'm using Thumbleweed template. Even on the example game that comes with AGS, changing "Number dialog options" doesn't do anything neither on AGS 3.5 or 3.6. I thought it should enable/disable numbering dialog options and enable/disable keyboardshortcuts for dialog options. But it doesn't. Do I have an irrelevant expectation or is it not functioning?

eri0o

I don't remember the details of why, but the Tumbleweed template uses a lite version of the CustomDialogGui module instead of the default interface.

Perhaps it's a limitation of that?

You can try making a backup and try switching to the full module to see if that has the functionality you want?

Khris

1. turn on numbering:

Code: ags
// in game_start
  CustomDialogGui.DialogGuiOptions[eDialogGui_text_numbering] = true;

2. open CustomDialogGui.asc (Scripts/CustomDialogGui/Edit Script)
   add the following function to the script (doesn't really matter where, I put it in line 790)

Code: ags
function dialog_options_key_press(DialogOptionsRenderingInfo *info, eKeyCode keycode, int mod)
{
  if (!CDG_options.text_numbering) return;
  int typed = keycode - eKey0;
  Dialog *d = info.DialogToRender;
  int option = 0;
  for (int i = 1; i <= d.OptionCount; i++) {
    if (d.GetOptionState(i) == eOptionOn) option++;
    if (option == typed) {
      info.ActiveOptionID = i;
      break;
    }
  }
  info.RunActiveOption();
}

lapsking

Thank you guys, the script solved the issue! Thank you again Khris.

SMF spam blocked by CleanTalk