mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
emoticons version 2
This commit is contained in:
parent
3a8af93e33
commit
e11e9a71ca
|
@ -1302,10 +1302,11 @@ void render_sun(float x, float y)
|
||||||
gfx_quads_end();
|
gfx_quads_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const int emoticon_selector_input_num = 30;
|
||||||
static bool emoticon_selector_inactive_override = false;
|
static bool emoticon_selector_inactive_override = false;
|
||||||
static int emoticon_selector_input_count = 0;
|
static int emoticon_selector_input_count = 0;
|
||||||
static int emoticon_selector_input_iter = 0;
|
static int emoticon_selector_input_iter = 0;
|
||||||
static vec2 emoticon_selector_inputs[10];
|
static vec2 emoticon_selector_inputs[emoticon_selector_input_num];
|
||||||
|
|
||||||
void emoticon_selector_reset()
|
void emoticon_selector_reset()
|
||||||
{
|
{
|
||||||
|
@ -1320,16 +1321,16 @@ int emoticon_selector_render()
|
||||||
|
|
||||||
if (x || y)
|
if (x || y)
|
||||||
{
|
{
|
||||||
emoticon_selector_inputs[emoticon_selector_input_iter++ % 10] = vec2(x, y);
|
emoticon_selector_inputs[emoticon_selector_input_iter++ % emoticon_selector_input_num] = vec2(x, y);
|
||||||
|
|
||||||
emoticon_selector_input_count++;
|
emoticon_selector_input_count++;
|
||||||
if (emoticon_selector_input_count > 10)
|
if (emoticon_selector_input_count > emoticon_selector_input_num)
|
||||||
emoticon_selector_input_count = 10;
|
emoticon_selector_input_count = emoticon_selector_input_num;
|
||||||
}
|
}
|
||||||
|
|
||||||
float selected_angle = 0;
|
float selected_angle = 0;
|
||||||
|
|
||||||
if (emoticon_selector_input_count > 5)
|
if (emoticon_selector_input_count > emoticon_selector_input_num/2)
|
||||||
{
|
{
|
||||||
vec2 sum;
|
vec2 sum;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue