|
@@ -10,6 +10,7 @@ from aques import Aques |
|
|
from playsound import playsound |
|
|
from playsound import playsound |
|
|
from common_module import CommonModule |
|
|
from common_module import CommonModule |
|
|
from youtube import * |
|
|
from youtube import * |
|
|
|
|
|
from datetime import datetime |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Main: |
|
|
class Main: |
|
@@ -42,7 +43,13 @@ class Main: |
|
|
|
|
|
|
|
|
screen.blit (balloon, (0, 0)) |
|
|
screen.blit (balloon, (0, 0)) |
|
|
screen.blit ( |
|
|
screen.blit ( |
|
|
user_font.render ('> ' + message, True, (0, 0, 0)), |
|
|
|
|
|
|
|
|
user_font.render ( |
|
|
|
|
|
'> ' + (message |
|
|
|
|
|
if (CommonModule.len_by_full (message) |
|
|
|
|
|
<= 21) |
|
|
|
|
|
else (CommonModule.mid_by_full ( |
|
|
|
|
|
message, 0, 19.5) |
|
|
|
|
|
+ '...')), True, (0, 0, 0)), |
|
|
(120, 70)) |
|
|
(120, 70)) |
|
|
screen.blit ( |
|
|
screen.blit ( |
|
|
nizika_font.render (answer, True, (192, 0, 0)), |
|
|
nizika_font.render (answer, True, (192, 0, 0)), |
|
@@ -71,6 +78,17 @@ class Main: |
|
|
f'live_chat.is_alive () == {live_chat.is_alive ()}', |
|
|
f'live_chat.is_alive () == {live_chat.is_alive ()}', |
|
|
True, (0, 0, 0)), |
|
|
True, (0, 0, 0)), |
|
|
(i % 2, i // 2 * 2)) |
|
|
(i % 2, i // 2 * 2)) |
|
|
|
|
|
screen.blit ( |
|
|
|
|
|
system_font.render (datetime.now (), True, (0, 0, 0)), |
|
|
|
|
|
(i % 2, 32 + i // 2 * 2)) |
|
|
|
|
|
|
|
|
|
|
|
if live_chat.is_alive (): |
|
|
|
|
|
screen.blit ( |
|
|
|
|
|
system_font.render ( |
|
|
|
|
|
f'messages == {[c.message |
|
|
|
|
|
for c in live_chat.get ().items]}', |
|
|
|
|
|
True, (0, 0, 0)), |
|
|
|
|
|
(i % 2, 64 + i // 2 * 2)) |
|
|
|
|
|
|
|
|
pygame.display.update () |
|
|
pygame.display.update () |
|
|
|
|
|
|
|
|