Тема: Help
Показать сообщение отдельно
Старый 26.08.2013, 13:37   #1
Volumka
AnyKey`щик
 
Регистрация: 26.08.2013
Сообщений: 3
Написано 0 полезных сообщений
(для 0 пользователей)
Вопрос Help



Programm LiveRPG;
var key, pos, lang: integer;
mn, pro, nv, pri, sd, op, root, fname : string;
begin
mn :Меню;
pro :Пофиль;
nv :=Навыки;
pri :=Привычки;
sd :=Список_дел;
op :Настройки;
pos :=1;
SetColor(255,255,255);
FillRect(0,0,getWidth,getHeight);
DrawText(mn,(getWidth-getStringWidht(mn))/2,15);
DrawText(pro,30,(getHeight-getStringHeight(pro))/2);
DrawText(nv,20,(getHeight-getStringHeight(nv))/2+25);
DrawText(pri,10,(getHeight-getStringHeight(pri))/2+50);
repaint;
key := keyToAction(getKeyClicked);
if key = GA_UP then if pos>1 then
pos := pos-1;
if key = GA_DOWN then if pos<5 then pos := pos+1;
if pos = 1 then
begin
DrawText(mn,(getWidth-getStringWidht(mn))/2,15);
DrawText(pro,30,(getHeight-getStringHeight(pro))/2);
DrawText(nv,20,(getHeight-getStringHeight(nv))/2+25);
DrawText(pri,10,(getHeight-getStringHeight(pri))/2+50);
repaint;
end;
if pos = 2 then
begin
DrawText(mn,(getWidth-getStringWidht(mn))/2,15);
DrawText(pro,20,(getHeight-getStringHeight(pro))/2-25);
DrawText(nv,30,(getHeight-getStringHeight(nv))/2);
DrawText(pri,20,(getHeight-getStringHeight(pri))/2+25);
DrawText(sd,10,(getHeight-getStringHeight(sd))/2+50);
repaint;
end;
if pos = 3 then
begin
DrawText(mn,(getWidth-getStringWidht(mn))/2,15);
DrawText(pro,10,(getHeight-getStringHeight(pro))/2-50)
DrawText(nv,20,(getHeight-getStringHeight(nv))/2-25);
DrawText(pr,30,(getHeight-getStringHeight(pr))/2);
DrawText(sd,20,(getHeight-getStringHeight(sd))/2+25);
DrawText(op,10,(getHeight-getStringHeight(op))/2+50);
repaint;
end;
if pos = 4 then
begin
DrawText(mn,(getWidth-getStringWidht(mn))/2,15);
DrawText(nv,10,(getHeight-getStringHeight(nv))/2-50);
DrawText(pri,20,(getHeight-getStringHeight(pri))/2-25);
DrawText(sd,30,(getHeight-getStringHeight(sd))/2);
DrawText(op,20,(getHeight-getStringHeight(op))/2+25);
repaint;
end;
if pos = 5 then
begin
DrawText(mn,(getWidth-getStringWidht(mn))/2,15);
DrawText(pri,10,(getHeight-getStringHeight(pri))/2-50);
DrawText(sd,20,(getHeight-getStringHeight(sd))/2-25);
DrawText(op,30,(getHeight-getStringHeight(op))/2);
repaint;
end;
if key = GA_FIRE then
begin
{
if pos = 1 then
begin
if pos = 2 then

if pos = 3 then

if pos = 4 then

if pos = 5 then

}

Буду рад если кому то пригодиться этот код
(Offline)
 
Ответить с цитированием