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

Added DearIMGUI bindings to AngelScript #2786

Merged
merged 4 commits into from Aug 31, 2021

Conversation

ohlidalp
Copy link
Member

@ohlidalp ohlidalp commented Aug 29, 2021

Terrain scripts can now draw arbitrary GUI using DearIMGUI. Can be useful for tutorials, missions, minigames, diagnostic views, custom minimaps, anything.

Example terrain:
workshop.zip
obrazek

@tritonas00
Copy link
Collaborator

tritonas00 commented Aug 29, 2021

A warning:

In file included from /home/babis/Downloads/ror-dependencies/rigs-of-rods/source/main/phc.h:37,
                 from /home/babis/Downloads/ror-dependencies/rigs-of-rods/source/main/CMakeFiles/RoR.dir/cmake_pch.hxx:5,
                 from <command-line>:
/home/babis/Downloads/ror-dependencies/rigs-of-rods/source/main/scripting/ImGuiAngelscript.cpp: In lambda function:
/home/babis/Downloads/ror-dependencies/rigs-of-rods/source/main/scripting/ImGuiAngelscript.cpp:173:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  173 |         ImGui::Image((ImTextureID)u, ImVec2(v.x, v.y));

Works fine though, nice one!

@ohlidalp
Copy link
Member Author

ohlidalp commented Aug 29, 2021

Turns out I have the same warning:

4>C:\Users\Petr\source\rigs-of-rods\source\main\scripting\ImGuiAngelscript.cpp(174,1): warning C4312: 'type cast': conversion from 'unsigned int' to 'ImTextureID' of greater size

Fixed by merging more old "Angelhud" code :)

@ohlidalp ohlidalp merged commit c8fcec8 into RigsOfRods:master Aug 31, 2021
@ohlidalp ohlidalp deleted the as_workshop branch August 31, 2021 19:55
@ohlidalp ohlidalp mentioned this pull request Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants