public game_area(Context context, int a_side, information_container information_Container)//elmentettem a context és az oldal hosszat, hogy ne kelljen minidg paraméterként megadni { parent_context = context; this.a_side = a_side; gomb_place = new int[a_side, a_side]; game_Button = new game_button(parent_context, 0, information_Container, a_side); this.information_Container = information_Container; }
public void game_area_load()//itt csak feltöltöm a sorokat a táblázatban üres gombokkal, hogy meg legyen az alakja a táblázatnak(így illeszkedni fog a telefon nagyságához) { game_Buttons = new FrameLayout[a_side, a_side]; for (int i = 0; i < game_area_tableLayout.ChildCount; i++) { TableRow tableRow = (TableRow)game_area_tableLayout.GetChildAt(i); for (int j = 0; j < a_side; j++) { game_button game_Button = new game_button(parent_context, 0, information_Container, a_side); tableRow.AddView(game_Button.Get_game_Button(), j); tableRow.GetChildAt(j).SetBackgroundColor(Color.Gray); game_Buttons[i, j] = (FrameLayout)tableRow.GetChildAt(j); } } }