- Create a file <dialog-name>.yml in adjunct/resources/ui/dialogs/
To get your dialog file included, you will have to build the resources. Opera will concatenate all yaml files (dialogs and definitions) into one big file. The file is located in $OPERADIR$/ui/dialogs.yml
- Write your yaml dialog in the file you have created
See the YAML reference for help.
Also, don't forget that the file will be concatenated, and you have to have the right indentation in your file. The top-most level in each individual file is a sequence of dialogs, with one level of indenation. - In order to build your resources:
- Unix: call '$ platforms/paxage/package --debugger exec --target lib-per-module devel:opera' or if you are comfortable with the default debugger setting (gdb --args), call: '$platforms/paxage/package --target lib-per-module devel:opera' under 'work/' (Write a bash script)
- Visual Studio: BuildResources-->Project Only-->Build Only BuildResources
- Test your dialog by launching Opera with the option ' -dialogtest "<dialog-name>" '.
You can also see ini-dialogs with the option ' - inidialogtest "<dialog-name>" '
- Write some code that launches your dialog, e.g. make a class that derives from OkCancelDialogContext, create an instance and call ShowDialog(DialogContext* dialog_context, UiContext* parent_context), DesktopWindow* parent_window).
- Launch Opera with the commandline option '-uiparserlog <filename>' to enable parser log output for dialogs.yml.
- Launch Opera with the commandline option '-uiwidgetsparserlog <filename>' to enable parser log output for widgets.yml.