- Custom Screens Part IIa: most glitches fixed, added custom background file to Oolite with predefined galaxy chart backgrounds. (Part IIb coming up: tweaks to the project file on macs)
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2909 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
32727684c6
commit
13b3d272c8
39
Resources/Config/screenbackgrounds.plist
Normal file
39
Resources/Config/screenbackgrounds.plist
Normal file
@ -0,0 +1,39 @@
|
||||
{
|
||||
short_range_chart = "oolite-short-range-chart.png";
|
||||
long_range_chart = "oolite-long-range-chart.png";
|
||||
|
||||
/* // This section is commented out, and not used by standard Oolite.
|
||||
// Use the following settings to add custom images to Oolite's screens
|
||||
|
||||
intro = "intro.png"; // background for the ships at game start
|
||||
status = "status.png";
|
||||
status_docked = "status-docked.png"; // if not defined, same as status
|
||||
status_in_flight = "status-in-flight.png"; // if not defined, same as status
|
||||
status_red_alert = "status-red-alert.png"; // if not defined, same as status
|
||||
report = "report.png"; // if not defined, same as status_docked
|
||||
|
||||
manifest = "manifest.png";
|
||||
equip_ship = "equip-ship.png";
|
||||
mount_weapon = "mount-weapon.png"; // if not defined, same as equip_ship
|
||||
shipyard = "shipyard.png";
|
||||
|
||||
long_range_chart1 = "long-range-chart1.png"; // if not defined, same as long_range_chart
|
||||
long_range_chart2 = "long-range-chart2.png"; // if not defined, same as long_range_chart
|
||||
long_range_chart3 = "long-range-chart3.png"; // if not defined, same as long_range_chart
|
||||
long_range_chart4 = "long-range-chart4.png"; // if not defined, same as long_range_chart
|
||||
long_range_chart5 = "long-range-chart5.png"; // if not defined, same as long_range_chart
|
||||
long_range_chart6 = "long-range-chart6.png"; // if not defined, same as long_range_chart
|
||||
long_range_chart7 = "long-range-chart7.png"; // if not defined, same as long_range_chart
|
||||
long_range_chart8 = "long-range-chart8.png"; // if not defined, same as long_range_chart
|
||||
|
||||
system_data = "system-data.png";
|
||||
system_data_nova = "system-data-nova.png";
|
||||
|
||||
market = "market.png";
|
||||
contracts = "contracts.png"; // if not defined, same as market
|
||||
|
||||
mission = "mission.png"; // default background, overridden by mission's background parameter.
|
||||
settings = "settings.png"; // game options / settings
|
||||
load_save = "load-save.png"; // load / save game screens
|
||||
*/
|
||||
}
|
@ -4706,16 +4706,15 @@ static PlayerEntity *sSharedPlayer = nil;
|
||||
// GUI stuff
|
||||
{
|
||||
GuiDisplayGen* gui = [UNIVERSE gui];
|
||||
|
||||
|
||||
[gui clear];
|
||||
[gui setTitle:[NSString stringWithFormat:DESC(@"long-range-chart-title-d"), galaxy_number+1]];
|
||||
// FIXME: charts & backgrounds are not compatible yet.
|
||||
#if 0
|
||||
OOTexture *background = nil;
|
||||
background = [OOTexture textureWithName:[UNIVERSE screenBackgroundNameForKey:@"long_range_chart"] inFolder:@"Images"];
|
||||
if (background == nil) background = [OOTexture textureWithName:[UNIVERSE screenBackgroundNameForKey:@"chart"] inFolder:@"Images"];
|
||||
[[UNIVERSE gui] setBackgroundTexture:background];
|
||||
#endif
|
||||
[gui setTitle:[NSString stringWithFormat:DESC(@"long-range-chart-title-d"), galaxy_number+1]];
|
||||
|
||||
NSString *bgName = nil;
|
||||
bgName = [UNIVERSE screenBackgroundNameForKey:[NSString stringWithFormat:@"long_range_chart%d", galaxy_number+1]];
|
||||
if (bgName == nil) bgName = [UNIVERSE screenBackgroundNameForKey:@"long_range_chart"];
|
||||
[[UNIVERSE gui] setBackgroundTexture:[OOTexture textureWithName:bgName inFolder:@"Images"]];
|
||||
|
||||
[gui setText:targetSystemName forRow:17];
|
||||
|
||||
NSString *displaySearchString = planetSearchString ? [planetSearchString capitalizedString] : (NSString *)@"";
|
||||
@ -4761,19 +4760,14 @@ static PlayerEntity *sSharedPlayer = nil;
|
||||
// GUI stuff
|
||||
{
|
||||
GuiDisplayGen* gui = [UNIVERSE gui];
|
||||
|
||||
|
||||
if ((abs(cursor_coordinates.x-galaxy_coordinates.x)>=20)||(abs(cursor_coordinates.y-galaxy_coordinates.y)>=38))
|
||||
cursor_coordinates = galaxy_coordinates; // home
|
||||
|
||||
|
||||
[gui clear];
|
||||
[gui setTitle:DESC(@"short-range-chart-title")];
|
||||
// FIXME: charts & backgrounds are not compatible yet.
|
||||
#if 0
|
||||
OOTexture *background = nil;
|
||||
background = [OOTexture textureWithName:[UNIVERSE screenBackgroundNameForKey:@"short_range_chart"] inFolder:@"Images"];
|
||||
if (background == nil) background = [OOTexture textureWithName:[UNIVERSE screenBackgroundNameForKey:@"chart"] inFolder:@"Images"];
|
||||
[[UNIVERSE gui] setBackgroundTexture:background];
|
||||
#endif
|
||||
|
||||
[gui setBackgroundTexture:[OOTexture textureWithName:[UNIVERSE screenBackgroundNameForKey:@"short_range_chart"] inFolder:@"Images"]];
|
||||
|
||||
[gui setText:targetSystemName forRow:19];
|
||||
[gui setText:[NSString stringWithFormat:DESC(@"short-range-chart-distance-f"), distance] forRow:20];
|
||||
@ -5431,7 +5425,11 @@ static NSString *last_outfitting_key=nil;
|
||||
}
|
||||
|
||||
[gui setShowTextCursor:NO];
|
||||
[gui setBackgroundTexture:[OOTexture textureWithName:[UNIVERSE screenBackgroundNameForKey:(eqKeyForSelectFacing != nil ? @"mount_weapon" : @"equip_ship")] inFolder:@"Images"]];
|
||||
NSString *bgName = nil;
|
||||
if (eqKeyForSelectFacing != nil) bgName = [UNIVERSE screenBackgroundNameForKey:@"mount_weapon"];
|
||||
if (bgName == nil) bgName = [UNIVERSE screenBackgroundNameForKey:@"equip_ship"];
|
||||
|
||||
[gui setBackgroundTexture:[OOTexture textureWithName:bgName inFolder:@"Images"]];
|
||||
}
|
||||
/* ends */
|
||||
|
||||
|
@ -1105,9 +1105,12 @@ static NSString * const kOOLogNoteShowShipyardModel = @"script.debug.note.showSh
|
||||
|
||||
[gui setText:@"press-space-commander" forRow:21 align:GUI_ALIGN_CENTER];
|
||||
[gui setColor:[OOColor yellowColor] forRow:21];
|
||||
|
||||
[gui setShowTextCursor:NO];
|
||||
[gui setBackgroundTexture:[OOTexture textureWithName:[UNIVERSE screenBackgroundNameForKey:@"report"] inFolder:@"Images"]];
|
||||
|
||||
NSString *bgName = [UNIVERSE screenBackgroundNameForKey:@"report"];
|
||||
if (bgName == nil) bgName = [UNIVERSE screenBackgroundNameForKey:@"status_docked"];
|
||||
if (bgName == nil) bgName = [UNIVERSE screenBackgroundNameForKey:@"status"];
|
||||
[gui setBackgroundTexture:[OOTexture textureWithName:bgName inFolder:@"Images"]];
|
||||
}
|
||||
/* ends */
|
||||
|
||||
@ -1167,9 +1170,12 @@ static NSString * const kOOLogNoteShowShipyardModel = @"script.debug.note.showSh
|
||||
|
||||
[gui setText:DESC(@"press-space-commander") forRow:21 align:GUI_ALIGN_CENTER];
|
||||
[gui setColor:[OOColor yellowColor] forRow:21];
|
||||
|
||||
[gui setShowTextCursor:NO];
|
||||
[gui setBackgroundTexture:[OOTexture textureWithName:[UNIVERSE screenBackgroundNameForKey:@"report"] inFolder:@"Images"]];
|
||||
|
||||
NSString *bgName = [UNIVERSE screenBackgroundNameForKey:@"report"];
|
||||
if (bgName == nil) bgName = [UNIVERSE screenBackgroundNameForKey:@"status_docked"];
|
||||
if (bgName == nil) bgName = [UNIVERSE screenBackgroundNameForKey:@"status"];
|
||||
[gui setBackgroundTexture:[OOTexture textureWithName:bgName inFolder:@"Images"]];
|
||||
}
|
||||
/* ends */
|
||||
|
||||
|
@ -901,11 +901,11 @@ OOINLINE BOOL RowInRange(OOGUIRow row, NSRange range)
|
||||
|
||||
if (alpha > 0.05f)
|
||||
{
|
||||
|
||||
PlayerEntity* player = [PlayerEntity sharedPlayer];
|
||||
|
||||
|
||||
glEnable(GL_LINE_SMOOTH);
|
||||
|
||||
[self drawGLDisplay:x - 0.5f * size_in_pixels.width :y - 0.5f * size_in_pixels.height :z :alpha];
|
||||
|
||||
if (self == [UNIVERSE gui])
|
||||
{
|
||||
if ([player guiScreen] == GUI_SCREEN_SHORT_RANGE_CHART)
|
||||
@ -919,7 +919,6 @@ OOINLINE BOOL RowInRange(OOGUIRow row, NSRange range)
|
||||
[self drawEqptList:[player equipmentList] z:z ];
|
||||
}
|
||||
}
|
||||
[self drawGLDisplay:x - 0.5f * size_in_pixels.width :y - 0.5f * size_in_pixels.height :z :alpha];
|
||||
|
||||
if (fade_sign)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user