[phpBB Debug] PHP Warning: in file /bitnami/phpbb/ext/kinerity/bestanswer/event/main_listener.php on line 514: Undefined array key "poster_answers"
BrDoom Fórum • Eclipse LUI by Fabio914 - Página 2
Página 2 de 3

Enviado: Qua Ago 20, 2008 6:31 am
por DU0
Space Marine escreveu:Acho q eh a abreviacao de print :P
Suspeitei desde o princípio... Me lembro de ter visto alguma coisa assim no java, mas ñ era pro print :3

Enviado: Qui Ago 21, 2008 3:08 pm
por Rico
Pelo que está me parecendo, não roda em Linux :/

Enviado: Qui Ago 21, 2008 6:21 pm
por Fabio914
R1c0 escreveu:Pelo que está me parecendo, não roda em Linux :/
Se eu conseguir portar a função gotoxy(); para o Linux então ele funcionará em Linux...

Enviado: Qui Ago 21, 2008 11:58 pm
por Fabio914
Post duplo , but...

R1c0 , se você quiser você pode tentar a versão 0.4 da API com um Gotoxy para Linux. Eu testei esse gotoxy no Windows e não funcionou , talvez funcione apenas no Linux...

OBS.: Quem for compilar no Windows , precisará alem da conio.h , também da conio.c .

Windows

Código: Selecionar todos

#include <stdio>
#include <stdlib>
#include <conio>
#include <conio>

//ECLIPSE LITE USER INTERFACE
//by FABIO914
// API! v.0.4

//Cursor Position
int x=1;
int y=2;

prtpos(int x, int y){
gotoxy(x,y);
printf("^");
}

//Cursor
prt_cursor(){
char pos;
prtpos(x,y);


pos = getch();

switch(pos){
case'2':y++; break;
case'8':y--; break;
case'4':x--; break;
case'6':x++; break;
}

if(x<1>=70){
x=70;
}

if(y<2>=20){
y=20;
}


}


cls(){
system("cls");
}

prt_border(char txt[29]){
printf("#=S==================%28s==================Q=#\n",txt);
}

prt_back(int x){
system("color 70");
gotoxy(1,2);
if (x == 0){
printf("**********************************************************************\n");
printf("*************************         ************************************\n");
printf("**********************    *******   **********************************\n");
printf("********************    ************ *********************************\n");
printf("*******************    ***********************************************\n");
printf("******************    ************************************************\n");
printf("******************   *************************************************\n");
printf("******************   *************************************************\n");
printf("******************   *************************************************\n");
printf("******************   *************************************************\n");
printf("*******************   ************************************************\n");
printf("********************   ***********************************************\n");
printf("*********************   **********************************************\n");
printf("************************ *********************************************\n");
printf("**************  ************************   *****  ********************\n");
printf("************  *****   ** **** ****   *** *****  **********************\n");
printf("**************  ** ***** **** **** * ***   *****  ********************\n");
printf("************  **** ***** **** **** ******* ***  **********************\n");
printf("**************  ***   **   ** **** *****   *****  ********************\n");
printf("**********************************************************************\n");
}
if (x == 1){
printf("\n");
printf("                        #########\n");
printf("                      ####       ###\n");
printf("                    ####            #\n");
printf("                   ####\n");
printf("                  ####\n");
printf("                  ###\n");
printf("                  ###\n");
printf("                  ###\n");
printf("                  ###\n");
printf("                   ###\n");
printf("                    ###\n");
printf("                      ##\n");
printf("                        #\n");
printf("              ##                        ###     ##\n");
printf("            ##     ###  #    #    ###   #     ##\n");
printf("              ##  #     #    #    # #   ###     ##\n");
printf("            ##    #     #    #    ##      #   ##\n");
printf("              ##   ###  ###  #    #     ###     ##\n");
printf("#====================================================================#\n");
}
}


prt_win_msg(char mensagem[20],int pos){
gotoxy(1,pos);
printf("#====== Msg Win ======#\n#%19s  #\n#=====================#\n",mensagem);
}

prt_win(char titulo[20], char msg[32] , char msgb[32],int pos){
gotoxy(1,pos);
printf("#====== %19s ======#\n",titulo);
printf("# %31s #\n",msg);
printf("# %31s #\n",msgb);
printf("#=================================#\n");
}

prt_win_quest(char titulo[20], char msg[32] , char msgb[32],int pos){
gotoxy(1,pos);
printf("#====== %19s =======#\n",titulo);
printf("# %32s #\n",msg);
printf("# %32s #\n",msgb);
printf("#      [YES(Y)]   [NO(N)]          #\n");
printf("#==================================#\n");
}

prt_win_ok(char titulo[20], char msg[32] , char msgb[32],int pos){
gotoxy(1,pos);
printf("#====== %19s =======#\n",titulo);
printf("# %32s #\n",msg);
printf("# %32s #\n",msgb);
printf("#             [OK(K)]              #\n");
printf("#==================================#\n");
}

int win_quest(char titulo[20], char msg[32] , char msgb[32],int pos){
char op;
int res=0;
prt_win_quest(titulo,msg,msgb,pos);
op = getch();
switch (op){
    case'Y':
    case'y':res=1; break;
    case'N':
    case'n':res=0; break;
    default:prt_win_msg("Error: Wrong Key!",pos+5); res=2; break;
    }

if (res == 2){
res = win_quest(titulo,msg,msgb,pos);
}

return res;

}

int win_ok(char titulo[20], char msg[32] , char msgb[32],int pos){
char op;
int res=0;
prt_win_ok(titulo,msg,msgb,pos);
op = getch();
switch (op){
    case'K':
    case'k':res=1; break;
    default:prt_win_msg("Error: Wrong Key!",pos+5); res=2; break;
    }

if (res == 2){
res = win_ok(titulo,msg,msgb,pos);
}

return res;

}

win_txt(char titulo[20], char msg[32], int pos, char text[32]){
int posx=1;

gotoxy(posx,pos);
printf("#====== %20s =======#\n",titulo);
printf("# %33s #\n",msg);
printf("#|_________________________________|#\n");
printf("#             [OK(ENTER)]           #\n");
printf("#===================================#\n");
gotoxy(posx+2,pos+2);
gets(text);

return text;
}

eclipse_start(char txt[29], int x){
cls();
prt_border(txt);
prt_back(x);
prt_cursor();
}

eclipse_program(char txt[29], int x){
char op;
eclipse_start(txt,x);
op = getch();
switch (op){
case'q':eclipse_exit(); break;
case's':eclipse_main(); break;
default: break;
}
eclipse_loop_main();
}

eclipse_loop_main(){
cls();
main();
}

eclipse_exit(){
if ( win_quest("        Exit       ","Exit to Terminal?               ","",y+1) == 1 ){
cls();
exit(1);
}
}


Linux

Código: Selecionar todos

#include <stdio>
#include <stdlib>

//ECLIPSE LITE USER INTERFACE (LINUX)
//by FABIO914
// API! v.0.4

//Cursor Position
int x=1;
int y=2;

//Goto XY no Linux

void gotoxy(int x, int y)
{
    printf("%c[%d;%df", 0x1B,y,x);
}

prtpos(int x, int y){
gotoxy(x,y);
printf("^");
}

//Cursor
prt_cursor(){
char pos;
prtpos(x,y);


pos = getch();

switch(pos){
case'2':y++; break;
case'8':y--; break;
case'4':x--; break;
case'6':x++; break;
}

if(x<1>=70){
x=70;
}

if(y<2>=20){
y=20;
}


}


cls(){
system("clear");
}

prt_border(char txt[29]){
printf("#=S==================%28s==================Q=#\n",txt);
}

prt_back(int x){
gotoxy(1,2);
if (x == 0){
printf("**********************************************************************\n");
printf("*************************         ************************************\n");
printf("**********************    *******   **********************************\n");
printf("********************    ************ *********************************\n");
printf("*******************    ***********************************************\n");
printf("******************    ************************************************\n");
printf("******************   *************************************************\n");
printf("******************   *************************************************\n");
printf("******************   *************************************************\n");
printf("******************   *************************************************\n");
printf("*******************   ************************************************\n");
printf("********************   ***********************************************\n");
printf("*********************   **********************************************\n");
printf("************************ *********************************************\n");
printf("**************  ************************   *****  ********************\n");
printf("************  *****   ** **** ****   *** *****  **********************\n");
printf("**************  ** ***** **** **** * ***   *****  ********************\n");
printf("************  **** ***** **** **** ******* ***  **********************\n");
printf("**************  ***   **   ** **** *****   *****  ********************\n");
printf("**********************************************************************\n");
}
if (x == 1){
printf("\n");
printf("                        #########\n");
printf("                      ####       ###\n");
printf("                    ####            #\n");
printf("                   ####\n");
printf("                  ####\n");
printf("                  ###\n");
printf("                  ###\n");
printf("                  ###\n");
printf("                  ###\n");
printf("                   ###\n");
printf("                    ###\n");
printf("                      ##\n");
printf("                        #\n");
printf("              ##                        ###     ##\n");
printf("            ##     ###  #    #    ###   #     ##\n");
printf("              ##  #     #    #    # #   ###     ##\n");
printf("            ##    #     #    #    ##      #   ##\n");
printf("              ##   ###  ###  #    #     ###     ##\n");
printf("#====================================================================#\n");
}
}


prt_win_msg(char mensagem[20],int pos){
gotoxy(1,pos);
printf("#====== Msg Win ======#\n#%19s  #\n#=====================#\n",mensagem);
}

prt_win(char titulo[20], char msg[32] , char msgb[32],int pos){
gotoxy(1,pos);
printf("#====== %19s ======#\n",titulo);
printf("# %31s #\n",msg);
printf("# %31s #\n",msgb);
printf("#=================================#\n");
}

prt_win_quest(char titulo[20], char msg[32] , char msgb[32],int pos){
gotoxy(1,pos);
printf("#====== %19s =======#\n",titulo);
printf("# %32s #\n",msg);
printf("# %32s #\n",msgb);
printf("#      [YES(Y)]   [NO(N)]          #\n");
printf("#==================================#\n");
}

prt_win_ok(char titulo[20], char msg[32] , char msgb[32],int pos){
gotoxy(1,pos);
printf("#====== %19s =======#\n",titulo);
printf("# %32s #\n",msg);
printf("# %32s #\n",msgb);
printf("#             [OK(K)]              #\n");
printf("#==================================#\n");
}

int win_quest(char titulo[20], char msg[32] , char msgb[32],int pos){
char op;
int res=0;
prt_win_quest(titulo,msg,msgb,pos);
op = getch();
switch (op){
    case'Y':
    case'y':res=1; break;
    case'N':
    case'n':res=0; break;
    default:prt_win_msg("Error: Wrong Key!",pos+5); res=2; break;
    }

if (res == 2){
res = win_quest(titulo,msg,msgb,pos);
}

return res;

}

int win_ok(char titulo[20], char msg[32] , char msgb[32],int pos){
char op;
int res=0;
prt_win_ok(titulo,msg,msgb,pos);
op = getch();
switch (op){
    case'K':
    case'k':res=1; break;
    default:prt_win_msg("Error: Wrong Key!",pos+5); res=2; break;
    }

if (res == 2){
res = win_ok(titulo,msg,msgb,pos);
}

return res;

}

win_txt(char titulo[20], char msg[32], int pos, char text[32]){
int posx=1;

gotoxy(posx,pos);
printf("#====== %20s =======#\n",titulo);
printf("# %33s #\n",msg);
printf("#|_________________________________|#\n");
printf("#             [OK(ENTER)]           #\n");
printf("#===================================#\n");
gotoxy(posx+2,pos+2);
gets(text);

return text;
}

eclipse_start(char txt[29], int x){
cls();
prt_border(txt);
prt_back(x);
prt_cursor();
}

eclipse_program(char txt[29], int x){
char op;
eclipse_start(txt,x);
op = getch();
switch (op){
case'q':eclipse_exit(); break;
case's':eclipse_main(); break;
default: break;
}
eclipse_loop_main();
}

eclipse_loop_main(){
cls();
main();
}

eclipse_exit(){
if ( win_quest("        Exit       ","Exit to Terminal?               ","",y+1) == 1 ){
cls();
exit(1);
}
}

Enviado: Sex Ago 22, 2008 12:42 am
por Rico
Estarei estudando os códigos.

Enviado: Sex Ago 22, 2008 6:34 am
por Imp Hunter
printf("**********************************************************************\n");
printf("************************* ************************************\n");
printf("********************** ******* **********************************\n");
printf("******************** ************ *********************************\n");
printf("******************* ***********************************************\n");
printf("****************** ************************************************\n");
printf("****************** *************************************************\n");
printf("****************** *************************************************\n");
printf("****************** *************************************************\n");
printf("****************** *************************************************\n");
printf("******************* ************************************************\n");
printf("******************** ***********************************************\n");
printf("********************* **********************************************\n");
printf("************************ *********************************************\n");
printf("************** ************************ ***** ********************\n");
printf("************ ***** ** **** **** *** ***** **********************\n");
printf("************** ** ***** **** **** * *** ***** ********************\n");
printf("************ **** ***** **** **** ******* *** **********************\n");
printf("************** *** ** ** **** ***** ***** ********************\n");
printf("**********************************************************************\n");


DU MAAAAALLL

Enviado: Sex Ago 22, 2008 1:33 pm
por Rico
realmente, programação para perveção o_O
só imp mesmo :/

Enviado: Sex Ago 22, 2008 6:45 pm
por Fabio914
R1c0 escreveu:Estarei estudando os códigos.
Não copie o código do que aparece ai , de um citar na minha mensagem e copie de lá , esse

Código: Selecionar todos

 do phpBB apaga alguns caracteres como o || e o &&

Enviado: Sáb Ago 23, 2008 1:00 am
por Rico
eu sei... eu estarei estudando... eu só vo daqui poco
eu ainda preciso baixar Eclipse 0.4 para ver se tem pra Linux...

Enviado: Sáb Ago 23, 2008 1:22 pm
por DanDare
Bacana.

Só fiquei numa curiosidade, no post original tem uma tela com a pergunta do quiz "doom foi inventado em 1995" A resposta é negativa.... certo ?


:p