Jump to content
Sign in to follow this  
Solidsnacks

Custom briefing background controls

Recommended Posts

I'm trying to customize the background of the mission briefing notes section and haven't found anything that addresses what I'm looking for. I can control fonts and colors fine, but there doesn't seem to be anything to change the background image or color/alpha. I've looked up the old briefing.html, but it says it's now obsolete. I'm not afraid to get into Dialog controls, though from what I've read I think I'd be barking up the wrong tree.

Share this post


Link to post
Share on other sites

You could create a picture with you briefing text on it, and insert that into the briefing.

Share this post


Link to post
Share on other sites

I considered that, only problem is the lack of marker links, page links etc.

Share this post


Link to post
Share on other sites

Simply not possible pretty much. Nothing can be done with the background of the briefing, nor any other tabs in the map. Unless you want to go guessing the control ID's for things in the map then you may be able to change some things (depending on if the background of it is a RscPicture or not is anyone's guess, if it is you could change it with ctrlSetText, in theory anyways, real issue is some of the code for it is hidden engine side and other peices are done through config and sqf), even then its going to get very messy most likely.

Share this post


Link to post
Share on other sites

I had a sneaking suspicion that was the case by the time I started this thread. Thanks for chiming in.

Share this post


Link to post
Share on other sites

Maybe you can work something out from the information in \a3\ui_f\hpp\defineResincl.inc

#define IDC_DIARY_TOPIC_LIST          1001
#define IDC_DIARY_TOPIC_LISTINDEX     1002
#define IDC_DIARY_TOPIC_HTML          1003  // this is only the background of the displayed html content
#define IDC_DIARY_TOPIC_ADD_RECORD    1004
#define IDC_DIARY_TOPIC_HTML_GROUP    1013
#define IDC_DIARY_TOPIC_BACKGROUND    1021
#define IDC_DIARY_SUBTOPIC_BACKGROUND 1022
#define IDC_DIARY_CONTENT_BACKGROUND  1023  // this is whole background of content area

Quick example, use from debugConsole for testing. Will add several records to the briefing section of the diary.

player createDiaryRecord ["Diary", ["Extraction", "Reach the designated landing zone and hold it until Extraction."]];
player createDiaryRecord ["Diary", ["Destroy Munitions", "Destroy any weapons and ammunition found on site."]];
player createDiaryRecord ["Diary", ["Secure the Depot", "Eliminate Defences at the Depot."]];
player createDiaryRecord ["Diary", ["Operation Blunt", "This is a mission to destroy the enemies munition supplies. You will be dropped off shore, complete the objectives and get to the extraction site."]];


((findDisplay 12) displayCtrl 1002) ctrlAddEventHandler [ "LBSelChanged", {
_recordCtrl = _this select 0;
_index = _this select 1;

_record = _recordCtrl lbText _index;

_subjectCtrl = ((findDisplay 12) displayCtrl 1001);
_subject = _subjectCtrl lbText ( lbCurSel _subjectCtrl );


if ( _subject isEqualTo "Briefing" ) then {
	switch ( _record ) do {
		case "Extraction" : {
			playSound "Alarm";
			hint "Diary - Extraction";
			( ( findDisplay 12 ) displayCtrl 1003  )  ctrlSetBackgroundColor [ 1, 0, 0, 1 ];
			( ( findDisplay 12 ) displayCtrl 1003  )  ctrlSetTextColor [ 0, 0, 0, 1 ];
			( ( findDisplay 12 ) displayCtrl 1023  )  ctrlSetBackgroundColor [ 1, 0, 0, 1 ];
		};
		case "Destroy Munitions" : {
			playSound "Alarm";
			hint "Diary - Destroy Munitions";
			( ( findDisplay 12 ) displayCtrl 1003  )  ctrlSetBackgroundColor [ 0, 1, 0, 1 ];
			( ( findDisplay 12 ) displayCtrl 1003  )  ctrlSetTextColor [ 0, 0, 0, 1 ];
			( ( findDisplay 12 ) displayCtrl 1023  )  ctrlSetBackgroundColor [ 0, 1, 0, 1 ];
		};
		case "Secure the Depot" : {
			playSound "Alarm";
			hint "Diary - Secure the Depot";
			( ( findDisplay 12 ) displayCtrl 1003  )  ctrlSetBackgroundColor [ 0, 0, 1, 1 ];
			( ( findDisplay 12 ) displayCtrl 1003  )  ctrlSetTextColor [ 0, 0, 0, 1 ];
			( ( findDisplay 12 ) displayCtrl 1023  )  ctrlSetBackgroundColor [ 0, 0, 1, 1 ];
		};
		case "Operation Blunt" : {
			playSound "Alarm";
			hint "Diary - Operation Blunt";
		};
	};
};

}];  

Remember there is only one area and it must be changed per record if it needs to be different for a different record. e.g Notice how Operation blunt entry has no color set in the code yet when you select it, it has the color of the last selected record.

Share this post


Link to post
Share on other sites

Nice one, Larrow! Consider uploading this to BIKI as this is a great example of what you can do if you dig deeper!

Share this post


Link to post
Share on other sites

Good job! I had actually been sifting through a3\ui_f_data\... last night, but was always a hair away from what I was looking for. Once I get some proper examples set up I'll throw them onto here. Seriously, big thanks, Larrow!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×