OSDN Git Service

いろいろ細かいバグを修正
[awarsiii/AwarsIV.git] / Awars III / ScenarioList.m
index 69f1b5f..68571c0 100755 (executable)
@@ -17,7 +17,7 @@
     
     startES = true;
     [stringText InitStringList];
-    
+    /*
     int k = 0;
     for(int j = 0;j < [SC[storyNumb].sName count];j++){
         for (int i = 0;i < [scenarioListMA count];i++) {
@@ -32,7 +32,7 @@
     zOMG:
     
     scenarioNumb = k;
-    
+    */
     MFselectedRow = scenarioNumb + 1;
     [SLPanel close];
     [NSApp stopModal];
     }
     
     [scenarioListTV setTarget:self];
+    [scenarioListTV setAction:@selector(ClickSL:)];
     [scenarioListTV setDoubleAction:@selector(doubleClickSL:)];
     [PUBscenario selectItemAtIndex:0];
 }
+-(void)ClickSL:(id)sender{
 
--(void)doubleClickSL:(id)sender{
-    
-    if([scenarioListTV selectedRow] < 0) return;
+    if([scenarioListTV selectedRow] < 0)
+        return;
     
     scenarioNumb = (int)[scenarioListTV selectedRow];
     storyNumb = (int)[PUBscenario indexOfSelectedItem] + 1;
     
+    sNameInst = [[scenarioListMA[[scenarioListTV selectedRow]] valueForKey:@"name"] retain];
+}
+
+-(void)doubleClickSL:(id)sender{
+    
+    if([scenarioListTV selectedRow] < 0) return;
+    
     startES = true;
     [stringText InitStringList];
     
+    /*
     int k = 0;
     for(int j = 0;j < [SC[storyNumb].sName count];j++){
         for (int i = 0;i < [scenarioListMA count];i++) {
     zOMG:
     
     scenarioNumb = k;
-    
+    */
     MFselectedRow = scenarioNumb + 1;
     [SLPanel close];
     [NSApp stopModal];