project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m
changeset 3643 858b20bafb6e
parent 3624 304c6d32383a
child 3644 42c5684289ae
--- a/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m	Thu Jul 15 01:18:51 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m	Thu Jul 15 03:28:29 2010 +0200
@@ -84,7 +84,7 @@
     self.ammoStoreImage = img;
     [img release];
     
-    self.tableView.rowHeight = 75;
+    self.tableView.rowHeight = 120;
 }
 
 -(void) viewWillAppear:(BOOL) animated {
@@ -146,12 +146,10 @@
     return 1;
 }
 
-
 -(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
     return CURRENT_AMMOSIZE;
 }
 
-
 // Customize the appearance of table view cells.
 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
     static NSString *CellIdentifier = @"Cell";
@@ -171,10 +169,12 @@
     cell.weaponName.text = [ammoNames objectAtIndex:row];
     cell.tag = row;
     
-    [cell.initialQt setTitle:[NSString stringWithFormat:@"%c",quantity[row]] forState:UIControlStateNormal];
-    cell.probability.titleLabel.text = [NSString stringWithFormat:@"%c",probability[row]];
-    cell.delay.titleLabel.text = [NSString stringWithFormat:@"%c",delay[row]];
-    cell.crateQt.titleLabel.text = [NSString stringWithFormat:@"%c",crateness[row]];
+    [cell.initialQt setValue:[[NSString stringWithFormat:@"%c",quantity[row]] intValue] animated:NO];
+    [cell.probabilityQt setValue:[[NSString stringWithFormat:@"%c", probability[row]] intValue] animated:NO];
+    [cell.delayQt setValue:[[NSString stringWithFormat:@"%c", delay[row]] intValue] animated:NO];
+    [cell.crateQt setValue:[[NSString stringWithFormat:@"%c",crateness[row]] intValue] animated:NO];
+    
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
     return cell;
 }
 
@@ -194,9 +194,9 @@
 
 #pragma mark -
 #pragma mark WeaponButtonControllerDelegate
--(void) buttonPressed:(id) sender {
-    UIButton *button = (UIButton *)sender;
-    DLog(@"%@ %d", button.titleLabel.text, button.tag);
+-(void) valueChanged:(id) sender {
+   // UIButton *button = (UIButton *)sender;
+   // DLog(@"%@ %d", button.titleLabel.text, button.tag);
 }
 
 #pragma mark -