Fixes 26 : add modulable size light and display the value of the size and the colors in the light editor#26
Conversation
… value in the light editor
There was a problem hiding this comment.
First of all, I REALLY liked the way of your fixes. The light size was holding a static value which was 100, finding this issue and fixing with dynamical way shows your passion.
I already added notes inside of your codes. Please check it out.
And as a summary, you only need to fix Black formatting which is easiest thing of this repo. Of course I can do this in 5 sec and push it but I really wanna encourage you deal with your own.
After this black formatting fix, it will be approved PR for this repo.
Thanks.
| with open(f"items/{name}.py", "w", encoding="utf-8") as file: | ||
| file.write( | ||
| f""" | ||
| file.write(f""" |
There was a problem hiding this comment.
It leads to fail black formatting on ci.yml. Try to use this command before push.
python3 -m black game_engine/It will pass on CI/CD pipeline, after this command
| {_memory["text"]["name"]} | ||
| ''')""" | ||
| ) | ||
| ''')""") |
There was a problem hiding this comment.
Same here that I mentioned on previous comment.
| self.light_editor_prompt_bool = False | ||
| elif light_editor_prompt_surf.item_coords == (260, 135): | ||
| light.update({"coords": [0, 0], "size": 100, "RGB": (int(R), int(G), int(B))}) | ||
| light.update({"coords": [0, 0], "size": int(size), "RGB": (int(R), int(G), int(B))}) |
There was a problem hiding this comment.
perfectly added dynamic value, thanks for this improvement @Hazim-AS
| G = UI.listen("G") * 255/100 | ||
| B = UI.listen("B") * 255/100 | ||
| UI.text(f"Size : {size}\n R : {int(R)}\n G : {int(G)}\n B : {int(B)}", 25, (70, 12), (200, 200, 200), scrollbar_area, font="impact") | ||
| R = UI.listen("R") * 255 / 100 |
There was a problem hiding this comment.
I liked the way you implemented and adjusted the new scrollbar_area.
Tested. And works as intended. 👍
It was using `or` statement for unsaved changes prompt. That means if you make some changes for size doesn't trigger that prompt and closes the light_editor
|
it's done I think |
Osman-Kahraman
left a comment
There was a problem hiding this comment.
yep, it passes the pipeline
I wasn't entirely satisfied with my commit so I decided to add some enhancement that seemed needed like :
linked to #23 and #6