Ryan F. Mercer
Whys
Version 4 (2011.02.01.0000)
Lists all active mods. Fully compatible.
Provides a list of all currently active mods. Click mod to view details. Click mod homepage to launch browser. Click 'Like It' to give mod positive rating. Click 'Privacy Policy' to view. Click 'Report' to report violation.
In ModBuddy, ModList.lua should be loaded as both a DiploCornerAddin and an InGameUIAddin. The mod will adapt automatically and load as a DiploCornerAddin if possible, accessible by clicking "Mod List" option in DiploCorner drop down menu. Otherwise this mod will load as an InGameUIAddin, accessible by clicking additional DiploCorner button left of drop down list.
To load this mod as a DiploCornerAddin, use the following mod concurrently: DiploCornerAddin (standard), or any other mod that implements the standard.
Screen Shots:
ModList.lua
ModList.xml
ModList.sql
Lists all active mods. Fully compatible.
Provides a list of all currently active mods. Click mod to view details. Click mod homepage to launch browser. Click 'Like It' to give mod positive rating. Click 'Privacy Policy' to view. Click 'Report' to report violation.
In ModBuddy, ModList.lua should be loaded as both a DiploCornerAddin and an InGameUIAddin. The mod will adapt automatically and load as a DiploCornerAddin if possible, accessible by clicking "Mod List" option in DiploCorner drop down menu. Otherwise this mod will load as an InGameUIAddin, accessible by clicking additional DiploCorner button left of drop down list.
To load this mod as a DiploCornerAddin, use the following mod concurrently: DiploCornerAddin (standard), or any other mod that implements the standard.
Screen Shots:
ModList.lua
Spoiler :
Code:
-- vymdt.04.2011.02.01.0000
-- Created by: Whys Alives -Open source
--===========================================================================
-- ModList.lua
--===========================================================================
--[[ Special Thanks: alpaca.
Provides a list of all currently active mods. Click mod to view details.
Click mod homepage to launch browser. Click 'Like It' to give mod positive
rating. Click 'Privacy Policy' to view. Click 'Report' to report violation.
This mod will load as a DiploCornerAddin if possible, accessible by clicking
"Mod List" option in DiploCorner drop down menu. Otherwise this mod will
load as an InGameUIAddin, accessible by clicking additional DiploCorner
button left of drop down list.
http://tiny.cc/2oi3t
Technical: DiploCornerAddin-standard by alpaca: http://tiny.cc/psux2
]]
--[[ This is kind of a hack, but does allow this mod to show up either as an
additional DiploCorner button left of the drop down list, or as an option in
DiploCorner drop down list. It does this automatically when loaded as *both*
a DiploCornerAddin and an InGameUIAddin. This file assumes that if it is
loaded more than once, then the necessary DiploCornerAddin-standard probably
loaded it the first time. Otherwise, it assumes it is an InGameUIAddin. ]]
if Players[0].DiploCornerAddin_ModList_ModListContainer ~= nil then
Players[0].DiploCornerAddin_ModList_ModListContainer:SetHide( true );
else Players[0].DiploCornerAddin_ModList_ModListContainer = Controls.ModListContainer;
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
include( "InstanceManager" );
--===========================================================================
--[[
Does nothing.
]]
function ShowHideHandler( bIsHide, bIsInit )
Controls.ModListContainer:SetHide( false );
end
ContextPtr:SetShowHideHandler( ShowHideHandler );
--===========================================================================
--[[
Called when option selected or button clicked.
]]
function OnCall()
g_context = g_context or ContextPtr:LoadNewContext( "ModListPopup" );
UIManager:QueuePopup( g_context, PopupPriority.NotificationLog );
end
--===========================================================================
--[[
Adds option to DiploCorner when DiploCornerAddin otherwise adds button.
]]
local option = { text = "TXT_KEY_MOD_LIST", tip = nil, call = OnCall };
LuaEvents.DiploCornerAddin( option );
Controls.ModListButton:RegisterCallback( Mouse.eLClick, OnCall );
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
end
--===========================================================================
--END ModList.lua
--===========================================================================
-- Created by: Whys Alives -Open source
ModList.xml
Spoiler :
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- vymdt.04.2011.02.01.0000 -->
<!-- Created by: Whys Alives -Open source -->
<!--======================================================================-->
<!-- ModList.xml -->
<!--======================================================================-->
<!--
Provides main-screen button when DiploCornerAddin-standard not available.
-->
<Context Font="TwCenMT14" FontStyle="Base" Color="Beige" Color1="Black">
<!--======================================================================-->
<!--
Content.
-->
<Container ID="ModListContainer" Size="45,45" Padding="0,0" Anchor="R,T" Offset="262,29" Hidden="1">
<Button ID="ModListButton" Anchor="C,C" Offset="0,0" Size="45,45" Texture="assets\UI\Art\Notification\NotificationNotes.dds" ToolTip="Mod List" ConsumeMouseOver="1" Hidden="0">
<ShowOnMouseOver>
<Image Anchor="C,C" Offset="0,0" Size="45,45" Texture="assets\UI\Art\Notification\NotificationNotes.dds" />
<AlphaAnim Anchor="C,C" AnchorSide="O,O" Offset="0,0" Size="45,45" Texture="assets\UI\Art\Notification\NotificationNotesHL.dds" Pause="0" Cycle="Bounce" Speed="1" AlphaStart="1" AlphaEnd="0" Hidden="0" />
</ShowOnMouseOver>
</Button>
</Container>
<!--======================================================================-->
</Context><!--END ModList.xml -->
<!--======================================================================-->
<!-- Created by: Whys Alives -Open source -->
ModList.sql
Spoiler :
Code:
-- vymdt.04.2011.02.01.0000
-- Created by: Whys Alives -Open source
--===========================================================================
-- ModList.sql
--===========================================================================
-- Adds text to database.
INSERT INTO Language_en_US ( 'Tag', 'Text' )
VALUES ( 'TXT_KEY_WHYS_ALIVES', 'Whys Alives' );
INSERT INTO Language_en_US ( 'Tag', 'Text' )
VALUES ( 'TXT_KEY_MOD_LIST', 'Mod List' );
INSERT INTO Language_en_US ( 'Tag', 'Text' )
VALUES ( 'TXT_KEY_POP_MOD_LIST', 'Currently Active Mods' );
INSERT INTO Language_en_US ( 'Tag', 'Text' )
VALUES ( 'TXT_KEY_POP_MOD_LIST_ITEM', 'Mod Details' );
INSERT INTO Language_en_US ( 'Tag', 'Text' )
VALUES ( 'TXT_KEY_PRIVACY_POLICY_URL', 'http://www.take2games.com/privacy/' );
INSERT INTO Language_en_US ( 'Tag', 'Text' )
VALUES ( 'TXT_KEY_MODDING_LABELRELOADLANDMARKSYSTEM', 'Reloads Landmark System?' );
INSERT INTO Language_en_US ( 'Tag', 'Text' )
VALUES ( 'TXT_KEY_MODDING_LABELRELOADSTRATEGICVIEWSYSTEM', 'Reloads Strategic View System?' );
INSERT INTO Language_en_US ( 'Tag', 'Text' )
VALUES ( 'TXT_KEY_MODDING_LABELRELOADUNITSYSTEM', 'Reloads Unit System?' );
INSERT INTO Language_en_US ( 'Tag', 'Text' )
VALUES ( 'TXT_KEY_MODDING_LABELMINCOMPATIBLESAVEVERSION', 'Min Compatible Save Version:' );
--===========================================================================
--END ModList.sql
--===========================================================================
-- Created by: Whys Alives -Open source