nodePong/client/lib/npg_client.js

93 lines
1.2 KiB
JavaScript
Raw Normal View History

2016-02-14 00:49:19 +11:00
/**
* @file NPGClient.js
* @author frtk
*/
var NPGClient = { 'version': '' };
2016-02-14 10:23:22 +11:00
NPGClient.NAMEMAXSIZE = 8;
NPGClient.userName = '';
2016-02-14 07:06:40 +11:00
// ui
NPGClient.CAN_W = 800;
NPGClient.CAN_H = 500;
NPGClient.CAN_COL = '#000000';
2016-02-14 10:23:22 +11:00
2016-02-14 14:37:31 +11: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 10:23:22 +11:00
2016-02-14 14:37:31 +11:00
/**
* APP PAGES
*/
NPGClient.pageCount = -1;
2016-02-14 10:23:22 +11:00
// Login Page
NPGClient.LOGIN = {
SERVSTATUS: {
'text': {
'online' : 'server: online',
'offline' : 'server: offline',
},
'x': 400,
'y': 450,
'style': {
2016-02-16 10:47:28 +11:00
'font': '15px Arial',
2016-02-14 10:23:22 +11:00
'col': '#FFFFFF',
'align': 'center'
},
},
2016-02-14 07:06:40 +11:00
TITLE: {
'text': 'nodePong',
2016-02-14 10:23:22 +11:00
'x': 400,
2016-02-14 07:06:40 +11:00
'y': 150,
2016-02-14 10:23:22 +11:00
'style': {
2016-02-16 10:47:28 +11:00
'font': '50px Arial',
2016-02-14 10:23:22 +11:00
'col': '#FFFFFF',
'align': 'center'
}
},
INPUT: {
2016-02-16 10:47:28 +11:00
'text': 'login: ',
'x': 285,
2016-02-14 10:23:22 +11:00
'y': 300,
'style': {
2016-02-16 10:47:28 +11:00
'font': '25px Monospace',
2016-02-14 10:23:22 +11:00
'col': '#FFFFFF',
2016-02-14 14:37:31 +11:00
'align': 'left'
2016-02-14 10:23:22 +11:00
}
},
2016-02-14 14:37:31 +11:00
CURSOR: {
'w': 19,
'h': 19,
2016-02-16 10:47:28 +11:00
'x': 390,
'y': 283,
2016-02-14 14:37:31 +11:00
'style': {
'fm': true,
'fc': '#FFFFFF',
'bm': false,
'bw': 0,
'bc': '',
}
},
2016-02-14 10:23:22 +11:00
};
2016-02-14 07:06:40 +11:00
2016-02-14 00:49:19 +11:00