• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice

[Template] Web-admin mutator settings class template

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
Introduction:

I've created a class template which enables easy creation of web-admin mutator setting pages. The name of that class template is TAdvMutatorSettings and it allows you to create a base-class for your settings screen at compile time. That base-class will do all the work behind the scenes. The only thing left is to put the mutator settings on the screen and reading them out after the save button is hit.


Features:
  • Gives the possibility to have more action buttons then the default save settings button.
  • Implements an easy to use API to create static or dynamic setting screens.
  • Screens can be created without any knowledge of HTML, JQuery or JavaScript (only for none-interactive screens).
  • Possible to make interactive screens by adding your own HTML, JQuery or JavaScripting.
  • On board locking feature to secure the mutator settings (no multi-admin hustle).
  • Possibility to define your own actions.
  • Multi-session support.

Download:

The package can only be downloaded from an SVN server. If you don't have it yet, then you will need to install an SVN client (e.g. TortoiseSVN).
SVN Checkout URL: svn://62.163.53.115/TAdvMutatorSettings/tags/V2.0/
SVN User Name: Guest
SVN Password: Welcome

Change log:
Release V2.0:
  • Added pre-processor directives to exclude/include features from the binary. This can reduce the size of the binary for those cases where a simple web-admin would be sufficient. The available directives are:
    • TAMS_LOCKING_SUPPORT
      If True, then the code to add the mutator lock bottons (right top of the settings screen) will be present.
      Default: True.
    • TAMS_PASSWORD_DIALOG_SUPPORT
      If True, then the code to generate the password dialogs will be present. This option will be automatically enabled if TAMS_LOCKING_SUPPORT is True.
      Default: True.
    • TAMS_DIALOG_SUPPORT
      If True, then the code to generate the dialogs will be present. This option will be automatically enabled if TAMS_PASSWORD_DIALOG_SUPPORT is True.
      Default: True.
    • TAMS_BUTTON_PANEL_SUPPORT
      If True, then the code to generate the top-right button panel will be present. This option will be automatically enabled if TAMS_LOCKING_SUPPORT is True.
      Default: True.
    • TAMS_PAYPAL_DONATE_SUPPORT
      If True, then the code to generate a PayPal donation button will be present.
      Default: False.
    • TAMS_PAYPAL_DONATE_BY_EMAIL
      If True, then the code to generate a PayPal donation button will be present assume that an email address is used to generate the button. If False, then it assumes that a PayPal Secure Hash is used.
      Default: False.
  • Added PayPal Donate support. This makes it very simple to add a PayPal Donate button to your web-admin page. For instance on the About tab. There are however a restriction. The PayPal button does break the web-page html code and for this reason it should be placed at the bottom of the last tab on your web-page. Any controls placed below the button will not work as they should be. The example shows where and how to place the button.
Release V1.2:
  • Added better dialog support.

Example:

The package includes a compilable and working example of a simple settings screen. Below two screenshots of the settings screen of the example mutator.





And this is the source to create those screens:
MyExampleMut/Classes/MyExampleMutSettings.us:
Code:
/**
 * @copyright Copyright
 
Last edited:

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
Did release a newer version (V1.1). The SVN link in the OP has been updated. With V1.1 it became easier to define your own pop-up windows. Examples of those can be found here. The RenderPasswordDlg() function in the TAdvMutatorSettings.uc file gives an example on how to define pop-up dialogs.
 

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
Released V2.0. Change log:
  • Added pre-processor directives to exclude/include features from the binary. This can reduce the size of the binary for those cases where a simple web-admin would be sufficient. The available directives are:
    • TAMS_LOCKING_SUPPORT
      If True, then the code to add the mutator lock bottons (right top of the settings screen) will be present.
      Default: True.
    • TAMS_PASSWORD_DIALOG_SUPPORT
      If True, then the code to generate the password dialogs will be present. This option will be automatically enabled if TAMS_LOCKING_SUPPORT is True.
      Default: True.
    • TAMS_DIALOG_SUPPORT
      If True, then the code to generate the dialogs will be present. This option will be automatically enabled if TAMS_PASSWORD_DIALOG_SUPPORT is True.
      Default: True.
    • TAMS_BUTTON_PANEL_SUPPORT
      If True, then the code to generate the top-right button panel will be present. This option will be automatically enabled if TAMS_LOCKING_SUPPORT is True.
      Default: True.
    • TAMS_PAYPAL_DONATE_SUPPORT
      If True, then the code to generate a PayPal donation button will be present.
      Default: False.
    • TAMS_PAYPAL_DONATE_BY_EMAIL
      If True, then the code to generate a PayPal donation button will be present assume that an email address is used to generate the button. If False, then it assumes that a PayPal Secure Hash is used.
      Default: False.
  • Added PayPal Donate support. This makes it very simple to add a PayPal Donate button to your web-admin page. For instance on the About tab. There are however a restriction. The PayPal button does break the web-page html code and for this reason it should be placed at the bottom of the last tab on your web-page. Any controls placed below the button will not work as they should be. The example shows where and how to place the button.