艦これの経験値を管理するツール
修订版 | 9ed350cd3182773cb8cd0f2a88435443ef6f2ab9 (tree) |
---|---|
时间 | 2013-11-11 00:29:59 |
作者 | masakih <masakih@user...> |
Commiter | masakih |
遠征タグ選択時に強制的にA勝利を選択しほかを選択不能にした
@@ -26,6 +26,8 @@ | ||
26 | 26 | |
27 | 27 | @property (retain) NSObjectController *selectedController; |
28 | 28 | |
29 | +@property NSInteger prevSelectedWinTag; | |
30 | + | |
29 | 31 | @end |
30 | 32 | |
31 | 33 | @interface KCBattleWindowController (KC_NSTabViewDelegate) <NSTabViewDelegate> |
@@ -148,14 +150,29 @@ | ||
148 | 150 | } |
149 | 151 | } |
150 | 152 | |
153 | +- (void)setManueverMode:(BOOL)flag | |
154 | +{ | |
155 | + if(flag) { | |
156 | + self.prevSelectedWinTag = [[self.winRadio selectedCell] tag]; | |
157 | + [self.winRadio selectCellWithTag:2]; | |
158 | + [self.winRadio setEnabled:NO]; | |
159 | + } else { | |
160 | + [self.winRadio setEnabled:YES]; | |
161 | + [self.winRadio selectCellWithTag:self.prevSelectedWinTag]; | |
162 | + } | |
163 | +} | |
151 | 164 | |
152 | 165 | - (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem |
153 | 166 | { |
154 | 167 | NSString *identifier = [tabViewItem identifier]; |
155 | 168 | if([identifier isEqualToString:@"battle"]) { |
156 | 169 | self.selectedController = self.battleViewController.controller; |
170 | + [self setManueverMode:NO]; | |
157 | 171 | } else if([identifier isEqualToString:@"manuever"]) { |
158 | 172 | self.selectedController = self.manueverViewController.controller; |
173 | + [self setManueverMode:YES]; | |
174 | + } else { | |
175 | + [self setManueverMode:NO]; | |
159 | 176 | } |
160 | 177 | } |
161 | 178 |