Zitat:
Ich habe deinen Code mal geändert.
Wobei das Aktiv := Aktiv + 1; immernoch falsch sitzt!
Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
begin
Aktiv := 1;
ImageNS.Picture.LoadFromFile('Graphiken\newgame_a.bmp');
ImageSL.Picture.LoadFromFile('Graphiken\loadgame.bmp');
ImageO.Picture.LoadFromFile('Graphiken\options.bmp');
ImageC.Picture.LoadFromFile('Graphiken\credits.bmp');
ImageB.Picture.LoadFromFile('Graphiken\beenden.bmp');
end;
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if key = vk_down then
begin
//Aktiv := Aktiv + 1;
case Aktiv of
1: begin
ImageNS.Picture.LoadFromFile('Graphiken\newgame_a.bmp');
ImageB.Picture.LoadFromFile('Graphiken\beenden.bmp');
end;
2: begin
ImageNS.Picture.LoadFromFile('Graphiken\newgame.bmp');
ImageSL.Picture.LoadFromFile('Graphiken\loadgame_a.bmp');
end;
3: begin
ImageSL.Picture.LoadFromFile('Graphiken\loadgame.bmp');
ImageO.Picture.LoadFromFile('Graphiken\options_a.bmp');
end;
4: begin
ImageO.Picture.LoadFromFile('Graphiken\options.bmp');
ImageC.Picture.LoadFromFile('Graphiken\credits_a.bmp');
end;
5: begin
ImageC.Picture.LoadFromFile('Graphiken\credits.bmp');
ImageB.Picture.LoadFromFile('Graphiken\beenden_a.bmp');
Aktiv := 0; //Wofür das???
end;
end;
Aktiv := Aktiv + 1;//<- Hier mussed hin!
end;
end.