-
Notifications
You must be signed in to change notification settings - Fork 26
Implemented UI System #201
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
base: main
Are you sure you want to change the base?
Conversation
inspectredc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll need to test it still when I get home because I want to make sure those header changes work properly (although it looks like its mostly just fixing things) but looks good to me otherwise, small comment on how we should standardise the return value of GetItemHeight. Is nice to see a lot of the larger
You mentioned in the discord this would allow for UI editing for modding purposes, will that be a future PR then and how would that kinda system work? (Asking out of curiousity)
| } | ||
|
|
||
| float TextureFactoryUI::GetItemHeight(const ParseResultData& item) { | ||
| return 150.0f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we standardise these numbers at all (i.e. with defines?) so that when adding for other factories it is clear what kind of increments you should use
|
|
||
| std::unordered_map<std::string, Texture2D> sLoadedTextures = {}; | ||
|
|
||
| Texture2D* GetOrLoadTexture(const ParseResultData& item) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could this be a static function for TextureFactoryUI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or maybe some more general texture class/namespace
|
|
||
| ExportResult TextureModdingExporter::Export(std::ostream&write, std::shared_ptr<IParsedData> data, std::string&entryName, YAML::Node&node, std::string* replacement) { | ||
| auto texture = std::static_pointer_cast<TextureData>(data); | ||
| uint8_t* ConvertTextureToRGBA(std::shared_ptr<TextureData> texture, YAML::Node &node, int* size) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would this make sense to put into some namespace/class? i know the compressed texture factory re-uses a fair bit of code from this section
No description provided.