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

Not an Issue but just to ask permission #5

Closed
PixelRifts opened this issue Sep 1, 2020 · 45 comments
Closed

Not an Issue but just to ask permission #5

PixelRifts opened this issue Sep 1, 2020 · 45 comments

Comments

@PixelRifts
Copy link
Contributor

I may find time today and tomorrow to add multiple styles(colour schemes) to the project. If I should do this please reply and of course close the issue. (Also specify If you want me to comment the code) Thanks in advance. :)

@PixelRifts
Copy link
Contributor Author

PixelRifts commented Sep 1, 2020

I am asking this because if you were planning to do this, I should not impede on it. lol

@ambrosiogabe
Copy link
Owner

That would be awesome! I was going to ask in my video if people wanted to make custom themes that I could use as part of customizing the engine. If you want you could create a folder called styles in the JadeEditor folder and put the complete styles there. I'll eventually make it a default search path for any themes :)

@PixelRifts
Copy link
Contributor Author

Yeah, but I was also going to include the selecting of the themes. That was what I was asking.:D

@ambrosiogabe
Copy link
Owner

Yeah I'm ok with that too, it would make it easier for me in the long run 🙂. The code for initialization is a bit all over the place, so if you have any issues feel free to just respond to this thread. I usually work till around 4 PM CST, but after that I'll be checking github and everything

@PixelRifts
Copy link
Contributor Author

OK! Should I close this issue or leave it open?

@ambrosiogabe
Copy link
Owner

We can close this for now and reopen if anything comes up regarding this. Thanks again for the help!

@PixelRifts PixelRifts reopened this Sep 1, 2020
@PixelRifts
Copy link
Contributor Author

Is the latest commit for this repo working? I got the error

mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in CommandHistory.obj

@PixelRifts
Copy link
Contributor Author

PixelRifts commented Sep 1, 2020

(while trying to run the engine...)
btw 4 PM pst is 2:30 AM for me so if you respond, I can only check it in the morning @ about 9-10

@ambrosiogabe
Copy link
Owner

ambrosiogabe commented Sep 1, 2020

Can you try deleting your bin folders? You'll have to delete it in the root of the project and then go into every folder in the JadeEngine/vendor folders and delete those bin folders also

@PixelRifts
Copy link
Contributor Author

Ill try

@ambrosiogabe
Copy link
Owner

All of them except for jadeEngine/vendor/monoVendor/bin if you do delete that one on accident you can just do a git pull. But I believe it should build correctly after that

@PixelRifts
Copy link
Contributor Author

PixelRifts commented Sep 1, 2020

Ok.
Mono vendor does not have a bin folder though

@ambrosiogabe
Copy link
Owner

Ok, you may want to make sure you do a git pull then and make sure your up to date. If so it shouldn't matter if it has a bin folder or not. Also make sure you run build.bat before you launch visual studio again

@PixelRifts
Copy link
Contributor Author

Here's the source of the problem I guess,

4>cl : command line warning D9025: overriding '/MT' with '/MTd'

Ill try what you say in the above comment 2hrs later i guess cause I have to go out now.

@ambrosiogabe
Copy link
Owner

The whole reason you're getting that error is because I switched the engine to a DLL and I had to switch the CRT to the DLL version. However visual studio won't automatically rebuild all the projects, so it will try to use the static library CRT in some projects (like glfw and imgui) and the dll CRT in others, which is why it says MTd instead of MDd. And you're good, sorry I responded so late, us being in different timezones is kind of hard Haha. But I'll keep an eye out on this thread

@PixelRifts
Copy link
Contributor Author

PixelRifts commented Sep 1, 2020

Yeah IKR Ill be back.
Also if you can, could you list which projects are compiled statically and which into dlls? I may be able to fix it that way too.

@ambrosiogabe
Copy link
Owner

Definitely I'll also respond to this with the projects that are static and the ones that are dynamic

@ambrosiogabe
Copy link
Owner

Ok so, the dynamically built libraries are:
JadeEngine/vendor/GLFW
and that's it. However you should definitely delete these folders:

JadeEngine/vendor/GLFW/bin
JadeEngine/vendor/GLFW/bin-int

JadeEngine/vendor/glad/bin
JadeEngine/vendor/glad/bin-int

JadeEngine/vendor/box2DVendor/bin
JadeEngine/vendor/box2DVendor/bin-int

JadeEngine/vendor/imguiVendor/bin
JadeEngine/vendor/imguiVendor/bin-int

Because I had to switch all of them to be MDd instead of MTd, and if you delete the bin's it should force a rebuild on Visual Studio's part. It will take a few minutes longer, but I believe that should solve it. I also edited the premake file to remove monoVendor since it is not working correctly atm.
So make sure to pull one more time and run build.bat one more time and that should be good.

@PixelRifts
Copy link
Contributor Author

That didn't work. :(

@PixelRifts
Copy link
Contributor Author

I may have found the issue. Ill write it when I wake up as it is very late rn

@ambrosiogabe
Copy link
Owner

Ok, so it turns out I had forgotten to push the updates to all the submodules that I had forked. Sorry about that! I figured it out after doing a fresh clone and I got the same issue. Now, if you update all your submodules and pull from origin/master again, you should have no issues building. Let me know if it persists :)

@PixelRifts
Copy link
Contributor Author

Great thanks for the help!

@PixelRifts
Copy link
Contributor Author

This repo takes ages to clone 😭

@PixelRifts PixelRifts reopened this Sep 2, 2020
@PixelRifts
Copy link
Contributor Author

In the Style json, what does AccentDark1 do?

@ambrosiogabe
Copy link
Owner

I cant remember off the top of my head, but I believe it's for when you hover over the menu buttons. It's possible that I did end up removing it though and not using it, but left it in the styles...

@PixelRifts
Copy link
Contributor Author

Yeah it seems to not do anything

@ambrosiogabe
Copy link
Owner

Yeah it probably doesn't, I'll look into it in a bit though and double check

@PixelRifts
Copy link
Contributor Author

k

@PixelRifts
Copy link
Contributor Author

oceanic theme if you want to try it out!
https://gist.github.com/PixelRifts/eed74ed72c94dfe777b1e8d1a1b6d549

@ambrosiogabe
Copy link
Owner

I like it! And I realized that AccentDark1 is supposed to be the color of the menu buttons on hover, it looks like I was just missing the line of code to do that. If you change line 381 of ImGuiLayer.cpp to use s_AccentDark1, then you should see the results :)

@PixelRifts
Copy link
Contributor Author

Ok!

@PixelRifts
Copy link
Contributor Author

PixelRifts commented Sep 2, 2020

Wait though it already does s_AccentDark1 is already being used by line 381
I just did not notice what it did.

@ambrosiogabe
Copy link
Owner

ambrosiogabe commented Sep 2, 2020

Sorry line 380 and 381 should be s_AccentDark1.

		colors[ImGuiCol_MenuBarButtonBgHover] = From(Settings::EditorStyle::s_AccentDark1);
		colors[ImGuiCol_MenuBarButtonBgActive] = From(Settings::EditorStyle::s_AccentDark1);

I guess today is just not my day haha

@PixelRifts
Copy link
Contributor Author

+btw the json file that is loaded cannot contain comments for some reason

@ambrosiogabe
Copy link
Owner

Yea that's documented here: nlohmann/json#376 for the library I'm using. It looks like they decided not to support it because it's not an official requirement of JSON, and they didn't think it would be a good idea for the library since it's primarily supposed to be used for serialization/deserialization, because then they would have to preserve the comments during parsing and everything. I eventually want to remove the need to manually edit the json files completely though which should help out in that regard :)

@PixelRifts
Copy link
Contributor Author

PixelRifts commented Sep 3, 2020

BTW the premake5.lua has an error
In the postBuildCommands line 97, when you copy the dll, the directory to copy the dll contains the dll name. So the build and run fails. Ive fixed it in my fork but I am informing you just in case :)
Edit: Fixed Terrible Grammar

@ambrosiogabe
Copy link
Owner

Thanks for letting me know! I feel like there has to be a better solution to copying the dll's around too, I just haven't looked into it yet. The way I'm doing it now just feels wrong haha

@PixelRifts
Copy link
Contributor Author

@ambrosiogabe
Copy link
Owner

Nice! Thanks Nikhil, I'll be able to ship a bunch of themes with the engine now when it goes out to the testing phase :D

@PixelRifts
Copy link
Contributor Author

Is there a helper function anywhere that can get all files in a directory(It is in form of a JPath)

@ambrosiogabe
Copy link
Owner

ambrosiogabe commented Sep 3, 2020

Yep, it's in Jade/file/IFile.h

static std::vector<JPath> GetFilesInDir(const JPath& directory)

For File System stuff, check out the file/IFile.h and file/IFileDialog.h for helpful functions :)

@PixelRifts
Copy link
Contributor Author

I have created a styles folder in JadeEditor Project. Is there a static variable to target it? Like s_EngineAssetsPath in Settings::General

@ambrosiogabe
Copy link
Owner

There is no path to target the JadeEditor/styles directory. You can create it if you would like though, inside JadeEditor/util/Settings.h there are all the editor related settings. You can create a new variable inside the EditorStyle class, or create a new class if you think that would be a better approach.

@PixelRifts
Copy link
Contributor Author

I was asking about the JadeEditor directory itself :)

@ambrosiogabe
Copy link
Owner

Gotcha, I thought I might have misunderstood that haha, there is no static variable that links to that either. I know I said you should create the styles directory in the JadeEditor directory, but if you feel like it may work better being stored in the default s_EngineAssetsPath, feel free to place it there instead. And if you do need to create more variables you can make them at your discretion. Once you create a pull request, I'll look through the code and let you know if there are any alternative ways to do things :)

This is definitely making me think about documentation which is probably going to be a next step in the project after scripting is sufficiently supported. I think I'm going to use Doxygen and come up with some local files for now, and eventually make a website

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

No branches or pull requests

2 participants