Alert Options (colour)

When an alert box is used, such as the character creation menu, can someone show the code on how to colour the entire box to match the games color scheme. (panes and such). I'm shooting for 'parchment' myself. hint hint
Yeah, that would be nice...


What sort of alert box? An actual JS.alert()?


Have you seen this?

http://textadventures.co.uk/forum/samples/topic/awxso7qzhk6vws2c5vtt1a/custom-alert


To change the colors around, you can do stuff like this in the JS function:

function showPopup(title,text) {
    $('#msgboxCaption').html(text);

    var msgboxOptions = {
        modal: true,
        autoOpen: false,
        title: title,
        buttons: [
            {
                text: 'OK',
                click: function () { $(this).dialog('close'); }
            },
        ],
        closeOnEscape: false,
    };

    $('#msgbox').dialog(msgboxOptions);
    $('#msgbox').dialog('open');
    // Remove the 'close' button.
    $('.ui-dialog-titlebar-close').remove();
    // Change the font and background colors to match Parchment style.
    $('.ui-dialog *').css({'color':'black','background':'rgb(250, 235, 215)'});
    // Change the borders to black.
    $('.ui-dialog-titlebar, .ui-dialog-buttonset *').css({'border':'1px solid black'});
    $('.ui-dialog-buttonpane').css('border-top','1px solid black');
};

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums