
			 ______________________________________
			|_X_|         ______________________ |_|
			|       <>   |                      |  |
			|  /\   <>   | Car Radio by Clayman |  |
			|  \/   <>   |______________________|  |
			|       <>    |_|_|_|_|_|_|_|_|_|__|   |
			|______________________________________|


******************************


Title: 	   ArmAII Car Radio

Author:    Clayman	<worldofclay@gmx.de>

Version:   2.3.1

Date:      01-26-2011

Requires:  ArmA2 V1.05 or above AND Operation Arrowhead expansion


******************************


Features:
 * Fully working Car Radio for all cars and trucks in ArmA2
 * All ArmA2 musictracks already included
 * Add as many own musictracks as you wish
 * Filteroptions InGame / own music
 * Repeat Funtcion
 * Random play
 * 12-color display
 * 7-color softkeys
 * two designs
 * Output Level depending on your soundcard / speakers ;-)

New in V2.1:
 * Adding own music will work now
 * Add additional vehicle types which have the radio available
 * Playlist editor
 * Main functions of the radio can be accessed via keyboard

New in V2.2:
 * Drag & Drop Function for Playlist Editor
 * Create your own pre-defined Playlist (in userconfig .hpp)
 * No additional variables have to be used if not needed
 * Define vehicle types which don't have the radio available
 * Optional tooltips

New in V2.3
 * All Operation Arrowhead musictracks added
 * Added missing musictracks from Patch 1.05 (Eagle Wing)
 * Fixed: Some buttons didn't work after leaving Playlist Editor via Cancel button
 * Car Radio can now be found under Modules (F7) and has a custom icon


******************************


Installation:
Copy the two folders '@CLAY_CarRadio' and 'userconfig' to your ArmAII directory.
Add the startup parameter '-mod=@CLAY_CarRadio' to your ArmAII shortcut.


******************************


Usage:
To make the Car Radio available in your own mission, place the 'Car Radio' Module (found under Modules (F7) > Car Radio) somewhere on your Map.
That's it.
The Radio will be available in any car or truck on the map. Just board it any select 'Car Radio' from the action menu.


******************************


Controls:
Some of the control elements should be self-explaining, other might not. Here is a short description of them:

 > - Starts the playback (changes to || )

 || - Stops the playback (changes back to > )

 + - Volume up

 - - Volume down

 >> - Next track

 << - Previous track

 /\ - Cycle through filters increasing (ArmA2 Music > User Music > All Music > Custom)

 \/ - Cycle through filters decreasing (ArmA2 Music > Custom > All Music > User Music)

 OFF - Closes the dialog (music keeps playing!)

 Playlist - Opens the Playlist Editor

 Repeat - When last track is over, playback beginns from first track (on/off)('Repeat' shown in display)

 Random - Random play (on/off)('Random' shown in display)

 Key Col - Cycle through the different key-colors

 Dspl Col - Cycle through the different display-color or sets automatic color change ('Col. Change' shown in display)

 Design - Switches Design (Black / "Silver")


******************************


Playlist Editor:
Using the Playlist Editor, you can create your very own playlist.
The list to the right sowns all available tracks. On the left, you see your custom playlist.

 < - Adds the track selected in the right list to your playlist (as last item)

 > - Removes the track selected in the left list from the playlist

 << - Adds all tracks to the playlist

 >> - Removes all tracks from the playlist

 Restore - Restores the pre-defined playlist (in userconfig)(manually created playlist will be lost!)

 OK - Closes the Playlist Editor and returns to the Radio, you custom playlist will be played

 Cancel - Closes the Playlist editor without saving any changes made in the Playlist Editor and returnes to the Radio


******************************


Show Tooltips:
It is possible, to show tooltips over some of the buttons of the radio, which explain the function of that button.
To enable these tooltips, write the following code into the init.sqf or the init-line of any unit on the map:


	CLAY_RadioShowTooltips = true;


******************************


Add your own music:
To add your own music to the Radio, you first have to define it in your description.ext.
Now you can add it to the Radio using the 'CLAY_RadioAddMusic' variable:


	CLAY_RadioAddMusic = [ [<Track | String>, <Title | String>, <Time | Number>] ];


Track = The classname of your music, as defined in the description.ext.

Title = The title of the track, like it will be shown in the Radio.

Time = The length of the track in seconds.


At the end it should look something like this:


	CLAY_RadioAddMusic = [ ["MySong01", "My Song 1", 123], ["MySong02", "My Song 2", 456] ];


******************************


Pre-defined Playlist:
You can create your own playlist, which will be available from mission start (Playlist: Custom).
Open the file '\userconfig\CLAY_CarRadio\CLAY_CarRadio.hpp'. Now you can enter your desired tracks into the array behind _userPlaylist. Format is the same as when adding own music:


	_userPlaylist = [ ["Track08_Harvest_Red", "Harvest Red", 78], ["Track26_Organ_Works", "Organ Works", 69], ["MySong01", "My Song 1", 123] ];


******************************


Additional vehicle classes:
You can add other vehicle types, which have the Car Radio available. For this, you have to add the vehicle names (from CfgVehicles) to the 'CLAY_RadioAddVehicles' variable.


	CLAY_RadioAddVehicles = ["M1A1", "AH1Z", "PBX"];


******************************


Vehicles types, for which the radio is not available:
Just like adding additional vehicle types for use with the radio, you can define vehicle types, which won't have the radio available, using the 'CLAY_RadioNoVehicles' variable.


	CLAY_RadioNoVehicles = ["SkodaRed", "HMMWV", "TowingTractor"];


******************************


Keyboard controls:
The main functions of the Radio can be used directly from your keyboard. The key for every function can be defined.

defaults:

 PAUSE - Play / Pause

 RIGHT ARROW - Next Track

 LEFT ARROW - Previous Track

 UP ARROW - Volume Up

 DOWN ARROW - Volume Down


To change these, open the file '\userconfig\CLAY_CarRadio\CLAY_CarRadio.hpp'.
Add the desired key number behind any of the variables _keyPlay, _keyNext, _keyPre, _keyVolUp and _keyVolDown.


******************************


Known Bugs:
 * Clicking on the next (>>) or previous (<<) keys very fast might result in the timer not working correctly.
 * Drag & Drop in Playlist Editor only works to add tracks to your own playlist. You can't remove tracks this way nor can you sort your playlist. (I'm working on a workaround for this, but I'm not sure if it's possible at all.)


******************************


For further information, support and an example mission showing you how to add your own music and additional vehicle types, please visit the following link:

	http://forums.bistudio.com/showthread.php?t=82665



Thanks:
BI for ArmAII
Vektorbosen for his (OFP) Dialog Tutorial
T_D for some help with the display-colorchange script
kju for support & some really nice ideas
Srgt_Foxhound, who "obliged" me to make this update ;-)


Disclaimer:
Use this whatsoever at your own risk. I take no responsibility for (im)possible damage 
to your game/system/health/relationship/life that may be caused by installation of this.


******************************


Change Log:

V2.3.1
 * Fixed 'nil' error

V2.3
 * Added Operation Arrowhead musictracks
 * Added tracks from Eagle Wing Campaign (Arma2 Patch 1.05)
 * Fixed bug when leaving Playlist Editor via Cancel button
 * Car Radio now found in Modules (F7)
 * Custom Icon

V2.2
 * Fixed all bugs introduced in Version 2.1
 * Drag & Drop function for Playlist Editor
 * Radio can be moved to any screen position
 * Own playlist can be pre-defined
 * No need for additional variables
 * Vehicles types which don't have the radio
 * Tooltips added
 * No more delay when clicking << or >>
 * Bug in display-colorchange fixed
 * Some minor cosmetics

V2.1.2
 * Music will stop playing after leaving a vehicle

V2.1.1
 * Fixed bug, which caused other music not to be played

V2.1
 * Adding own music will work now
 * Additional vehicle types that can use the Car Radio can be added
 * Added Playlist Editor
 * Main functions can be accessed via keyboard

V2.0
 * Ported to ArmAII
 * Re-write of all scripts
 * New, highly improved design
 * Unlimited amount of own tracks can be added
 * Different playlists
 * Random play function
 * Automatic color change for display
 * Soft keys in 7 colors


	(OFP Version)
V1.6:
 * 2 different color design themes
 * Some bugs fixed

V1.5:
 * 12-color display
 * 3-color softkeys

V1.4:
 * Added 5-color display
 * All global variables are taged now

V1.3:
 * Main script optimised
 * Ability to add own music (up to 10 tracks)
 * "Glowing" display

V1.2:
 * Time now displayed in minutes and seconds
 * Some minor bugs fixed

V1.1:
 * Time and volume in display will be shown correctly when re-opening the dialog
 * Bug removed that caused dialog to close automaticly

V1.0:
 * Bug removed when switching from last track in playlist to the first or other way around
 * Moved all scripts to a seperate folder

V0.99:
 * First BETA
 * Track will be shown in display after re-opening the dialog

V0.95:
 * Optimised design
 * Music keeps playing when dialog is re-opened

V0.9:
 * First Version
