vle-forge / irritator

Other
5 stars 4 forks source link

show node number in node editor #22

Closed quesnel closed 3 years ago

quesnel commented 3 years ago

It would be nice to see node number on editor graphics too (on header near the type for example)

ynedelec3 commented 3 years ago

Hi Could this expression at line 2483 in node-editor.cpp do the job correctly ? It works on a simple test...

                ImGui::Text("%s\n%i",
                  dynamics_type_names[static_cast<int>(mdl->type)],
                  i); /*Nedelec, node id i added below node type*/
quesnel commented 3 years ago

Yes, it works. Is that enough for you? Just to remove a warning, as i variable is a size_t integer, use "%zu" instead of "%i".

Do you provide a patch or a pull request? Or I create it ?

ynedelec3 commented 3 years ago

I'll try to provide a pull request.

Thanks for having rectified.


Yves NEDELEC Cerema Sud-Ouest Département Territoires Groupe Eau, Risques, Résilience Responsable d'études hydrogéologie et risque littoral Chercheur associé à l'équipe Hydraulique pour l'Aménagement

http://www.cerema.fr

@.*** Tel : 05 56 70 63 68

Informations professionnelles : https://fr.linkedin.com/in/yves-n%C3%A9d%C3%A9lec-927165b0 [1] Références scientifiques : http://www.researcherid.com/rid/B-8894-2008 [2], https://www.researchgate.net/profile/Yves_Nedelec2 [3]

Le 14/06/2021 10:09, > notifications a écrit :

Yes, it works. Is that enough for you? Just to remove a warning, as i variable is a size_t integer, use "%zu" instead of "%i".

Do you provide a patch or a pull request? Or I create it ?

-- You are receiving this because you commented. Reply to this email directly, view it on GitHub [1], or unsubscribe [2].

Links:

[1] https://github.com/vle-forge/irritator/issues/22#issuecomment-860480422 [2] https://github.com/notifications/unsubscribe-auth/AFPK2I4YV5Q5QCLH4TCWFNDTSW2MFANCNFSM4Y74KRKA

ynedelec3 commented 3 years ago

Hi, since creating a pull request needs a separate branch (as far as I can see) a patch is probably simpler, how do I create and provide it ? (sorry I'm not familiar with collaborative coding with git ...)

quesnel commented 3 years ago

Hi. No problem, Even for small patches, it's very simple to create pull request. You need to:

  1. Fork the project into your Github home account.
  2. Modify the file directly (with the Github editor for little patch) or via git rebase && edit && git commit && git push
  3. Create a pull request between your origin/master to vle-forge/irritator/master
ynedelec3 commented 3 years ago

Meanwhile I learnd to build patch file, is this one good, I added extension txt to upload ? 0001-Show-node-numer-above-node-type-in-editor.patch.txt (I'll also initiate the pulling request above and won't complete it if the patch file is enough...)

quesnel commented 3 years ago

I confirm. The patch is good.

Please, can you just remove the comment in the code and rename the commit message (the subject of the mail). gui: show node number above node type in editor

ynedelec3 commented 3 years ago

0001-Show-node-numer-above-node-type-in-editor.patch.txt

I hope the commit message was actually line 4 in file

quesnel commented 3 years ago

All is good. I can push your patch. Is ok for you?

ynedelec3 commented 3 years ago

I did not completed but I prepared something reproduced below from screen which should be an appropiate pull request ?

Not urgent anyway if patch is fine. essai_pull_request

ynedelec3 commented 3 years ago

Everything is ok Thanks for all advices

quesnel commented 3 years ago

Your screenshot is good. You can create the pull request!

ynedelec3 commented 3 years ago

I guess this issue can be closed as well

quesnel commented 3 years ago

Yes of course!