BoredProject
This commit is contained in:
parent
3f2e6fdb4e
commit
b3d06906ff
9 changed files with 195 additions and 3 deletions
46
Chat/private/ClientGUI.cpp
Normal file
46
Chat/private/ClientGUI.cpp
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
|
||||
#include "ClientGui.hpp"
|
||||
#include "imgui.h"
|
||||
|
||||
using namespace tp;
|
||||
using namespace ImGui;
|
||||
|
||||
void ClientGUI::draw(ChatAPI& api) {
|
||||
|
||||
if (Begin("window_name")) {
|
||||
|
||||
if (api.isLogged()) {
|
||||
|
||||
static int item_current1 = 0;
|
||||
const char *items1[] = {"Never", "Gonna", "Give", "You", "Up"};
|
||||
Combo("User", &item_current1, items1, IM_ARRAYSIZE(items1));
|
||||
|
||||
BeginListBox("History");
|
||||
Text("as");
|
||||
Text("asa");
|
||||
EndListBox();
|
||||
|
||||
static char buff[1000];
|
||||
InputTextMultiline("Message", buff, 1000);
|
||||
|
||||
if (Button("Send")) {
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
InputText("Name", mCredentials.name, ChatAPI::Credentials::SIZE);
|
||||
InputText("Pass", mCredentials.pass, ChatAPI::Credentials::SIZE);
|
||||
|
||||
if (mInvalidCredentials) {
|
||||
Text("Invalid Credentials");
|
||||
}
|
||||
|
||||
if (Button("Login")) {
|
||||
api.login(mCredentials);
|
||||
mInvalidCredentials = !api.isLogged();
|
||||
}
|
||||
}
|
||||
|
||||
} End();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue