Make the sfml parts a separate dependency so you can use them if you want.
This commit is contained in:
parent
de0d957c66
commit
b7c49711b6
4 changed files with 47 additions and 31 deletions
|
@ -21,8 +21,8 @@ static const char _Parser_actions[] = {
|
|||
};
|
||||
|
||||
static const char _Parser_key_offsets[] = {
|
||||
0, 0, 4, 20, 33, 35, 39, 41,
|
||||
44, 56, 61
|
||||
0, 0, 4, 20, 33, 35, 39, 44,
|
||||
47, 59, 64
|
||||
};
|
||||
|
||||
static const char _Parser_trans_keys[] = {
|
||||
|
@ -30,26 +30,26 @@ static const char _Parser_trans_keys[] = {
|
|||
46, 61, 94, 95, 9, 13, 60, 62,
|
||||
65, 90, 97, 122, 37, 40, 42, 46,
|
||||
61, 94, 95, 60, 62, 65, 90, 97,
|
||||
122, 48, 57, 41, 44, 48, 57, 48,
|
||||
57, 41, 48, 57, 32, 93, 95, 124,
|
||||
9, 13, 48, 57, 65, 90, 97, 122,
|
||||
32, 93, 124, 9, 13, 32, 91, 9,
|
||||
13, 0
|
||||
122, 48, 57, 41, 44, 48, 57, 32,
|
||||
9, 13, 48, 57, 41, 48, 57, 32,
|
||||
93, 95, 124, 9, 13, 48, 57, 65,
|
||||
90, 97, 122, 32, 93, 124, 9, 13,
|
||||
32, 91, 9, 13, 0
|
||||
};
|
||||
|
||||
static const char _Parser_single_lengths[] = {
|
||||
0, 2, 8, 7, 0, 2, 0, 1,
|
||||
0, 2, 8, 7, 0, 2, 1, 1,
|
||||
4, 3, 2
|
||||
};
|
||||
|
||||
static const char _Parser_range_lengths[] = {
|
||||
0, 1, 4, 3, 1, 1, 1, 1,
|
||||
0, 1, 4, 3, 1, 1, 2, 1,
|
||||
4, 1, 1
|
||||
};
|
||||
|
||||
static const char _Parser_index_offsets[] = {
|
||||
0, 0, 4, 17, 28, 30, 34, 36,
|
||||
39, 48, 53
|
||||
0, 0, 4, 17, 28, 30, 34, 38,
|
||||
41, 50, 55
|
||||
};
|
||||
|
||||
static const char _Parser_indicies[] = {
|
||||
|
@ -57,24 +57,24 @@ static const char _Parser_indicies[] = {
|
|||
7, 9, 7, 10, 3, 8, 10, 10,
|
||||
1, 4, 5, 6, 7, 9, 7, 10,
|
||||
8, 10, 10, 1, 11, 1, 12, 13,
|
||||
14, 1, 15, 1, 16, 17, 1, 18,
|
||||
20, 19, 21, 18, 19, 19, 19, 1,
|
||||
22, 23, 24, 22, 1, 25, 2, 25,
|
||||
1, 0
|
||||
14, 1, 15, 15, 16, 1, 17, 18,
|
||||
1, 19, 21, 20, 22, 19, 20, 20,
|
||||
20, 1, 23, 24, 25, 23, 1, 26,
|
||||
2, 26, 1, 0
|
||||
};
|
||||
|
||||
static const char _Parser_trans_targs[] = {
|
||||
1, 0, 2, 2, 3, 4, 3, 3,
|
||||
3, 3, 8, 5, 3, 6, 5, 7,
|
||||
3, 7, 9, 8, 10, 2, 9, 10,
|
||||
2, 10
|
||||
3, 3, 8, 5, 3, 6, 5, 6,
|
||||
7, 3, 7, 9, 8, 10, 2, 9,
|
||||
10, 2, 10
|
||||
};
|
||||
|
||||
static const char _Parser_trans_actions[] = {
|
||||
0, 0, 3, 0, 17, 0, 13, 5,
|
||||
11, 15, 21, 19, 23, 23, 0, 19,
|
||||
26, 0, 7, 0, 32, 29, 0, 9,
|
||||
1, 0
|
||||
11, 15, 21, 19, 23, 23, 0, 0,
|
||||
19, 26, 0, 7, 0, 32, 29, 0,
|
||||
9, 1, 0
|
||||
};
|
||||
|
||||
static const int Parser_start = 1;
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace lel {
|
|||
percent = "%" $percent;
|
||||
halign = ("<" | ">") $align;
|
||||
number = digit+ >{ start = fpc; } %token;
|
||||
setw = ("(" number %setwidth ("," number %setheight)? ")") ;
|
||||
setw = ("(" number %setwidth ("," space* number %setheight)? ")") ;
|
||||
modifiers = (percent | center | expand | valign | halign | setw);
|
||||
id = ((alpha | '_')+ :>> (alnum | '_')*) >{start = fpc;} %id;
|
||||
cell = modifiers* id;
|
||||
|
|
|
@ -143,6 +143,7 @@ namespace guecs {
|
|||
|
||||
bool UI::mouse(float x, float y, bool hover) {
|
||||
int action_count = 0;
|
||||
// BUG: use lel::Parser.hit instead of this
|
||||
|
||||
query<lel::Cell>([&](auto ent, auto& cell) {
|
||||
if((x >= cell.x && x <= cell.x + cell.w) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue