Skip to content

Commit

Permalink
Fix some блять
Browse files Browse the repository at this point in the history
  • Loading branch information
themanyfaceddemon committed Aug 26, 2024
1 parent 9fe79a5 commit 5c3cdd0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Code/api/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ async def net_ooc_chat(self, sender: str, msg: str):

@staticmethod
async def send_ooc(msg: str):
await Client.request_method("net", "ooc_chat", msg=msg)
await Client.request_method("ooc_chat", msg=msg)
return
10 changes: 9 additions & 1 deletion Code/gui/conntect.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from DMBotNetwork import Client
from root_path import ROOT_PATH
from systems.loc import Localization as loc

from api.chat import ChatModule
logger = logging.getLogger("Connect")

class ConnectManager:
Expand All @@ -24,8 +24,16 @@ def create_connect_window(self):
dpg.add_input_int (label=loc.get_string("connect_port_lable") , tag="connect_port")

dpg.add_button(label=loc.get_string("connect_button"), callback=self.run_client)

dpg.add_input_text(hint="send_msg_debug", tag="OOC_CHAT")
dpg.add_button(label="send", callback=self.send_chat_msg)

async def send_chat_msg(self, *args):
await ChatModule.send_ooc(dpg.get_value("OOC_CHAT"))

async def run_client(self, sender, app_data, user_data):
await Client.close_connection()

login_value = dpg.get_value("connect_login")
password_value = dpg.get_value("connect_password")
host_value = dpg.get_value("connect_host")
Expand Down
6 changes: 6 additions & 0 deletions Content/Client/loc/rus/connect_window.loc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
connect_main_text = Соединение с сервером
connect_login_hint = Логин
connect_password_hint = Пароль
connect_host_hint = IP
connect_port_lable = Порт
connect_button = Соединиться

0 comments on commit 5c3cdd0

Please sign in to comment.