feat: add android support
This commit is contained in:
@@ -136,7 +136,7 @@ void renderMainMenu() {
|
||||
static std::string worldFilePath;
|
||||
|
||||
ImGui::InputInt("Server Port", &port, -1);
|
||||
ImGui::Text(std::string("Fichier de monde sélectionné : " + (worldFilePath.empty() ? std::string("Aucun") : worldFilePath)).c_str());
|
||||
ImGui::Text("%s", std::string("Fichier de monde sélectionné : " + (worldFilePath.empty() ? std::string("Aucun") : worldFilePath)).c_str());
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Ouvrir un fichier")) {
|
||||
ImGui::OpenPopup("WorldFileDialog");
|
||||
@@ -178,7 +178,7 @@ void showPlayers() {
|
||||
for (auto pair : client->getGame().getPlayers()) {
|
||||
const td::game::Player& player = pair.second;
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, getImGuiTeamColor(player.getTeamColor()));
|
||||
ImGui::Text(player.getName().c_str());
|
||||
ImGui::Text("%s", player.getName().c_str());
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
ImGui::TreePop();
|
||||
@@ -321,8 +321,16 @@ void tick() {
|
||||
lastTime = td::utils::getTime();
|
||||
}
|
||||
|
||||
void pollEvents(){
|
||||
SDL_Event event;
|
||||
while(SDL_PollEvent(&event)){
|
||||
ImGui_ImplSDL2_ProcessEvent(&event);
|
||||
}
|
||||
}
|
||||
|
||||
void render() {
|
||||
tick();
|
||||
pollEvents();
|
||||
beginFrame();
|
||||
client->render();
|
||||
if (client->isConnected())
|
||||
|
||||
Reference in New Issue
Block a user