- Treballant en el editor de templates
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "jgame.h"
|
||||
#include "console.h"
|
||||
#include "editor.h"
|
||||
#include "jutil.h"
|
||||
|
||||
namespace modules
|
||||
{
|
||||
@@ -155,15 +156,6 @@ namespace modules
|
||||
return false;
|
||||
}
|
||||
|
||||
const uint8_t scancode_to_char(const uint8_t scancode)
|
||||
{
|
||||
if (scancode == SDL_SCANCODE_0) return '0';
|
||||
if (scancode >= SDL_SCANCODE_1 && scancode <= SDL_SCANCODE_9) return scancode+19;
|
||||
if (scancode >= SDL_SCANCODE_A && scancode <= SDL_SCANCODE_Z) return scancode+61;
|
||||
//if (scancode == SDL_SCANCODE_MINUS) return '-';
|
||||
return '-';
|
||||
}
|
||||
|
||||
const bool btn_txt(const char* label, const int x, const int y, char *var)
|
||||
{
|
||||
//draw::print(label, x, y+3, PAPER, 0);
|
||||
@@ -177,7 +169,7 @@ namespace modules
|
||||
if (len>0) var[len-1] = 0;
|
||||
} else {
|
||||
if (len<15) {
|
||||
var[len] = scancode_to_char(result);
|
||||
var[len] = util::scancode_to_char(result);
|
||||
var[len+1] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user