Project

General

Profile

« Previous | Next » 

Revision 93847dfc

Added by Leszek Koltunski over 2 years ago

Progress with Object Config UI.

View differences:

src/main/java/org/distorted/config/ConfigScreenPane.java
49 49
    R.id.configDifficulty4
50 50
    };
51 51

  
52
  private static final int[] CHECK =
53
    {
54
    R.drawable.diff_check0,
55
    R.drawable.diff_check1,
56
    R.drawable.diff_check2,
57
    R.drawable.diff_check3,
58
    R.drawable.diff_check4,
59
    };
60

  
61
  private static final int[] UNCHECK =
62
    {
63
    R.drawable.diff_uncheck0,
64
    R.drawable.diff_uncheck1,
65
    R.drawable.diff_uncheck2,
66
    R.drawable.diff_uncheck3,
67
    R.drawable.diff_uncheck4,
68
    };
69

  
70 52
  private static final int NUM_IMAGES = IMAGES.length;
71 53
  private static final float PADDING_RATIO = 0.015f;
72 54
  private static final float TEXT_RATIO    = 0.025f;
......
114 96
    for(int i=0; i<NUM_IMAGES; i++)
115 97
      {
116 98
      ImageView image = layout.findViewById(IMAGES[i]);
117
      image.setImageResource( i==difficulty ? CHECK[i] : UNCHECK[i] );
99
      image.setImageResource( i==difficulty ? R.drawable.ui_difficulty_checked : R.drawable.ui_difficulty_unchecked );
118 100
      }
119 101
    }
120 102

  
src/main/res/layout/config_difficulty.xml
38 38
             android:layout_width="0dp"
39 39
             android:layout_height="match_parent"
40 40
             android:layout_weight="1"
41
             android:src="@drawable/diff_uncheck0"/>
41
             android:src="@drawable/ui_difficulty_unchecked"/>
42 42

  
43 43
        <ImageView
44 44
             android:id="@+id/configDifficulty1"
......
46 46
             android:layout_height="match_parent"
47 47
             android:layout_weight="1"
48 48
             android:gravity="center"
49
             android:src="@drawable/diff_uncheck1"/>
49
             android:src="@drawable/ui_difficulty_unchecked"/>
50 50

  
51 51
        <ImageView
52 52
             android:id="@+id/configDifficulty2"
......
54 54
             android:layout_height="match_parent"
55 55
             android:layout_weight="1"
56 56
             android:gravity="center"
57
             android:src="@drawable/diff_uncheck2"/>
57
             android:src="@drawable/ui_difficulty_unchecked"/>
58 58

  
59 59
        <ImageView
60 60
             android:id="@+id/configDifficulty3"
......
62 62
             android:layout_height="match_parent"
63 63
             android:layout_weight="1"
64 64
             android:gravity="center"
65
             android:src="@drawable/diff_uncheck3"/>
65
             android:src="@drawable/ui_difficulty_unchecked"/>
66 66

  
67 67
        <ImageView
68 68
             android:id="@+id/configDifficulty4"
......
70 70
             android:layout_height="match_parent"
71 71
             android:layout_weight="1"
72 72
             android:gravity="center"
73
             android:src="@drawable/diff_uncheck4"/>
73
             android:src="@drawable/ui_difficulty_unchecked"/>
74 74

  
75 75
    </LinearLayout>
76 76

  

Also available in: Unified diff