mirror of
https://github.com/chocolate-doom/launcher.git
synced 2024-11-22 12:41:03 +00:00
Disable the IWAD selector dropdown if no IWADs have been configured at
all. Subversion-branch: /launcher Subversion-revision: 1755
This commit is contained in:
parent
59587038c7
commit
6833b3e308
1 changed files with 6 additions and 0 deletions
|
@ -42,10 +42,13 @@ static NSString *IWADLabels[NUM_IWAD_TYPES] =
|
|||
IWADLocation *iwadList[NUM_IWAD_TYPES];
|
||||
id location;
|
||||
unsigned int i;
|
||||
unsigned int enabled_wads;
|
||||
|
||||
[self getIWADList: iwadList];
|
||||
[self->iwadSelector removeAllItems];
|
||||
|
||||
enabled_wads = 0;
|
||||
|
||||
for (i=0; i<NUM_IWAD_TYPES; ++i)
|
||||
{
|
||||
location = [iwadList[i] getLocation];
|
||||
|
@ -53,8 +56,11 @@ static NSString *IWADLabels[NUM_IWAD_TYPES] =
|
|||
if (location != nil && [location length] > 0)
|
||||
{
|
||||
[self->iwadSelector addItemWithTitle: IWADLabels[i]];
|
||||
++enabled_wads;
|
||||
}
|
||||
}
|
||||
|
||||
[self->iwadSelector setEnabled: (enabled_wads > 0)];
|
||||
}
|
||||
|
||||
- (IWAD) getSelectedIWAD
|
||||
|
|
Loading…
Reference in a new issue