OSDN Git Service

基地航空隊の情報ウインドウを表示できるようにした
authormasakih <masakih@users.sourceforge.jp>
Sun, 4 Dec 2016 13:10:01 +0000 (22:10 +0900)
committermasakih <masakih@users.sourceforge.jp>
Sun, 4 Dec 2016 13:10:01 +0000 (22:10 +0900)
KCD/Base.lproj/MainMenu.xib
KCD/HMAppDelegate.m

index aafc85b..462d184 100644 (file)
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11201" systemVersion="15G1108" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2659" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11201"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11542"/>
     </dependencies>
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
@@ -422,6 +422,11 @@ CA
                                     <action selector="showHideScreenshotListWindow:" target="-1" id="Ynz-Sq-TRj"/>
                                 </connections>
                             </menuItem>
+                            <menuItem title="Air Base Info" keyEquivalent="k" id="S96-gd-cGb">
+                                <connections>
+                                    <action selector="showHideAirBaseInfoWindow:" target="494" id="cQX-ax-QHm"/>
+                                </connections>
+                            </menuItem>
                         </items>
                     </menu>
                 </menuItem>
index 217d591..981ca96 100644 (file)
@@ -16,6 +16,8 @@
 #import "HMUpgradableShipsWindowController.h"
 #import "HMScreenshotListWindowController.h"
 #import "HMShipMasterDetailWindowController.h"
+#import "HMAirBaseWindowController.h"
+
 
 #import "HMExternalBrowserWindowController.h"
 #import "HMBrowserContentAdjuster.h"
@@ -53,6 +55,7 @@
 @property (nonatomic, strong) HMSlotItemWindowController *slotItemWindowController;
 @property (nonatomic, strong) HMPreferencePanelController *preferencePanelController;
 @property (nonatomic, strong) HMUpgradableShipsWindowController *upgradableShipWindowController;
+@property (nonatomic, strong) HMAirBaseWindowController *airBaseWindowController;
 
 //@property (strong) HMExternalBrowserWindowController *externalBrowserWindowController;
 @property (nonatomic, strong) HMBrowserContentAdjuster *browserContentAdjuster;
                        [menuItem setTitle:NSLocalizedString(@"Hide Upgradable Ships", @"")];
                }
                return YES;
-       } else if(action == @selector(showHideScreenshotListWindow:)) {
-               NSWindow *window = self.screenshotListWindowController.window;
-               if(!window.isVisible || !window.isMainWindow) {
-                       [menuItem setTitle:NSLocalizedString(@"Show Screenshot List", @"")];
-               } else {
-                       [menuItem setTitle:NSLocalizedString(@"Hide Screenshot List", @"")];
-               }
-               return YES;
-       } else if(action == @selector(saveLocalData:) || action == @selector(loadLocalData:)) {
+    } else if(action == @selector(showHideScreenshotListWindow:)) {
+        NSWindow *window = self.screenshotListWindowController.window;
+        if(!window.isVisible || !window.isMainWindow) {
+            [menuItem setTitle:NSLocalizedString(@"Show Screenshot List", @"")];
+        } else {
+            [menuItem setTitle:NSLocalizedString(@"Hide Screenshot List", @"")];
+        }
+        return YES;
+    } else if(action == @selector(showHideAirBaseInfoWindow:)) {
+        NSWindow *window = self.airBaseWindowController.window;
+        if(!window.isVisible || !window.isMainWindow) {
+            [menuItem setTitle:NSLocalizedString(@"Show Air Base Info", @"")];
+        } else {
+            [menuItem setTitle:NSLocalizedString(@"Hide Air Base Info", @"")];
+        }
+        return YES;
+    } else if(action == @selector(saveLocalData:) || action == @selector(loadLocalData:)) {
                return YES;
        } else if(action == @selector(showHidePreferencePanle:)) {
                return YES;
                [window orderOut:nil];
        }
 }
+- (IBAction)showHideAirBaseInfoWindow:(id)sender
+{
+    if(!self.airBaseWindowController) {
+        self.airBaseWindowController = [HMAirBaseWindowController new];
+    }
+    
+    NSWindow *window = self.airBaseWindowController.window;
+    if(!window.isVisible || !window.isMainWindow) {
+        [window makeKeyAndOrderFront:nil];
+    } else {
+        [window orderOut:nil];
+    }
+}
 
 - (IBAction)openNewBrowser:(id)sender
 {