Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack images #13

Open
nthiery opened this issue Sep 17, 2019 · 2 comments
Open

Stack images #13

nthiery opened this issue Sep 17, 2019 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@nthiery
Copy link
Owner

nthiery commented Sep 17, 2019

Currently, the labyrinth is not drawn just below the ant. Also, if the ant carries a rock, that rock is not drawn, instead a dedicated message is displayed. This is unlike the original game.

Implementation: stack the html images as in the following examples:

#include <xwidgets/xhtml.hpp>
xw::html html;
html.value = R"html(<style>
    .stack
    {
      position: absolute;
      top: 0px;
      left: 0px;
    }
</style>
<div style="position: relative; left: 0; top: 0;">
    <img src="exit.svg">
    <img src="ant-e.svg" class="stack">
</div>)html";

html.display()
@nthiery nthiery added enhancement New feature or request good first issue Good for newcomers labels Sep 17, 2019
@Disatiler
Copy link
Contributor

Disatiler commented Mar 25, 2020

Bonjour Monsieur,

Excusez-moi de ne pas avoir envoyé de mail pour vous expliquer mon problème. Mais remarquant que Jeudi il était déjà trop tard pour vous envoyez le message, j'ai décidé de résoudre le problème tout seul alors voici une fourmi avec son cailloux sur le dos!
(Il faut juste le mettre dans le même folder que les image mais je vais faire un NodeJs pour pouvoir chercher les images de très loin).
Pour tester le code penser a supprimer les * devant les balises c'est pour éviter que le commentaire l'interprete.

#include <xwidgets/xhtml.hpp>
xw::html html;

html.value = R"html(<style>
.stack
{
position: absolute;
top: 0px;
left: 0px;
}
</style>

<*div style="position: relative; left: 5px; top: 5px;">
<img src="rock.svg" class="stack" width=20 height=20 >
<
/div>
<*img src="ant-s.svg">
)html";

html.display()

@nthiery
Copy link
Owner Author

nthiery commented Mar 25, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants