• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン

SWFファイル内の画像を表示/書き出しするGUIツール


Commit MetaInfo

Revisiond63bff7e4019ce46d69f79353ff22e32372e3baa (tree)
Zeit2016-09-30 20:50:13
Autormasakih <masakih@user...>
Commitermasakih

Log Message

画像をコピー出来るようにした

Ändern Zusammenfassung

Diff

--- a/KoreNoKaraSu/Base.lproj/HMSwfDocument.xib
+++ b/KoreNoKaraSu/Base.lproj/HMSwfDocument.xib
@@ -110,12 +110,12 @@
110110 <rect key="frame" x="216" y="0.0" width="404" height="500"/>
111111 <autoresizingMask key="autoresizingMask"/>
112112 <subviews>
113- <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="aA5-RV-VMg">
113+ <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="u2c-dB-mIy">
114114 <rect key="frame" x="20" y="20" width="364" height="460"/>
115115 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
116- <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="Umz-WW-g2L"/>
116+ <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="wic-XG-vBm"/>
117117 <connections>
118- <binding destination="UYM-GR-Pyx" name="value" keyPath="selection.image" id="oVK-ZM-QA8"/>
118+ <binding destination="UYM-GR-Pyx" name="value" keyPath="selection.image" id="OXx-Tm-x6k"/>
119119 </connections>
120120 </imageView>
121121 </subviews>
@@ -146,6 +146,13 @@
146146 </arrayController>
147147 <menu id="lCG-dk-6rz">
148148 <items>
149+ <menuItem title="Copy" id="d9p-PZ-3gg">
150+ <modifierMask key="keyEquivalentModifierMask"/>
151+ <connections>
152+ <action selector="copy:" target="-2" id="ggr-15-tiC"/>
153+ </connections>
154+ </menuItem>
155+ <menuItem isSeparatorItem="YES" id="fON-ES-Oye"/>
149156 <menuItem title="Export…" id="IWB-MT-07s">
150157 <modifierMask key="keyEquivalentModifierMask"/>
151158 <connections>
--- a/KoreNoKaraSu/HMSwfDocument.m
+++ b/KoreNoKaraSu/HMSwfDocument.m
@@ -86,7 +86,7 @@
8686 return YES;
8787 }
8888
89-- (IBAction)exportSelection:(id)sender
89+- (HMSwfImage *)actionTarget
9090 {
9191 HMSwfImage *swfImage = nil;
9292
@@ -98,10 +98,16 @@
9898 if(!swfImage) {
9999 NSIndexSet *selectionIndexes = self.imagesController.selectionIndexes;
100100 NSArray *selection = [self.swfImages objectsAtIndexes:selectionIndexes];
101- if(selection.count == 0) return;
101+ if(selection.count == 0) return nil;
102102 swfImage = selection[0];
103103 }
104104
105+ return swfImage;
106+}
107+
108+- (IBAction)exportSelection:(id)sender
109+{
110+ HMSwfImage *swfImage = [self actionTarget];
105111 if(!swfImage) return;
106112
107113 NSSavePanel *panel = [NSSavePanel savePanel];
@@ -141,4 +147,12 @@
141147 }];
142148 }
143149
150+- (IBAction)copy:(id)sender
151+{
152+ HMSwfImage *swfImage = [self actionTarget];
153+ NSPasteboard *pb = [NSPasteboard generalPasteboard];
154+ [pb clearContents];
155+ [pb writeObjects:@[swfImage.image]];
156+}
157+
144158 @end