Utils - Modular DiploCorner

Discussion in 'Civ5 - Mod Components' started by whoward69, Apr 6, 2012.

  1. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,581
    Location:
    Near Portsmouth, UK
    Enhanced version (with permission) of alpaca's Modularized DiploCorner (which is backward compatible with the previous version.)

    Treats the contents of the drop-down as a "list of lists" thereby enabling entries to be inserted into the list as opposed to everything being appended to the end of the list.

    The lists are named - tech, diplomatic, military, economic, victory, demographics and logs - and each standard entry is the first item in each of the seven lists.

    When adding an entry via LuaEvents.DiploCornerAddin(), specify which list to add the entry to via the "group" aspect, eg

    Code:
    LuaEvents.DiploCornerAddin({ [COLOR="Red"]group="diplomatic"[/COLOR], text="City State Summary", tip="Displays a summary of City State relationships", call=showCityStateRelationships})
    all other use of the code is exactly as for the original version (see full details via the link above)

    An eighth, initially empty, list (called "other") acts as a catch all for any entry without a group.

    If a mod using this code loads first, mods using the original non-group call will be placed into the "other" group, so will appear at the end of the drop-down list (left image below). If a mod using the original code loads first, it will ignore the group aspect for new mods and just append the entry to the end of the drop-down menu (right image below).

     
  2. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,581
    Location:
    Near Portsmouth, UK
  3. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,581
    Location:
    Near Portsmouth, UK
    I've updated this on Steam Workshop so it will support both the new "official" method for add-ins and the old "custom" method
     

Share This Page