nodePong/client/lib/npg_client.js

95 lines
1.3 KiB
JavaScript
Raw Normal View History

2016-02-13 14:49:19 +01:00
/**
* @file NPGClient.js
* @author frtk
*/
var NPGClient = { 'version': '' };
2016-02-14 00:23:22 +01:00
NPGClient.NAMEMAXSIZE = 8;
NPGClient.userName = '';
2016-02-13 21:06:40 +01:00
// ui
NPGClient.CAN_W = 800;
NPGClient.CAN_H = 500;
NPGClient.CAN_COL = '#000000';
2016-02-14 00:23:22 +01:00
2016-02-14 04:37:31 +01:00
/**
* Keyboard events
*/
NPGClient.KEYS = {
F1 : 112,
SPACE : 32,
ESC : 27,
ARROW_UP : 38,
ARROW_DOWN : 40,
ENTER : 13,
DELETE : 46,
BACKSPACE : 8,
};
2016-02-14 00:23:22 +01:00
2016-02-14 04:37:31 +01:00
/**
* APP PAGES
*/
NPGClient.pageCount = -1;
2016-02-14 00:23:22 +01:00
// Login Page
NPGClient.LOGIN = {
SERVSTATUS: {
'text': {
'online' : 'server: online',
'offline' : 'server: offline',
},
'x': 400,
'y': 450,
'style': {
'font': '15px Lucida Console',
'col': '#FFFFFF',
'align': 'center'
},
},
2016-02-13 21:06:40 +01:00
TITLE: {
'text': 'nodePong',
2016-02-14 00:23:22 +01:00
'x': 400,
2016-02-13 21:06:40 +01:00
'y': 150,
2016-02-14 00:23:22 +01:00
'style': {
'font': '50px Lucida Console',
'col': '#FFFFFF',
'align': 'center'
}
},
INPUT: {
'text': 'enter a name: ',
2016-02-14 04:37:31 +01:00
'x': 265,
2016-02-14 00:23:22 +01:00
'y': 300,
'style': {
'font': '25px Lucida Console',
'col': '#FFFFFF',
2016-02-14 04:37:31 +01:00
'align': 'left'
2016-02-14 00:23:22 +01:00
}
},
2016-02-14 04:37:31 +01:00
CURSOR: {
'w': 19,
'h': 19,
'pos': {
'x': 435,
'y': 283,
},
'style': {
'fm': true,
'fc': '#FFFFFF',
'bm': false,
'bw': 0,
'bc': '',
}
},
2016-02-14 00:23:22 +01:00
};
2016-02-13 21:06:40 +01:00
2016-02-13 14:49:19 +01:00