-
Notifications
You must be signed in to change notification settings - Fork 1
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
Overlays folder #31
Overlays folder #31
Conversation
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.
plz review if you actually set f_desk_image properly
src/path_functions.cpp
Outdated
} | ||
else if (file_exists(get_image_suffix( | ||
VPath("overlays/" + w_courtroom->server_overlay)))) { | ||
f_desk_image = w_courtroom->server_overlay; |
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.
what even changes? This is the same line as L147
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.
f_desk_image = w_courtroom->server_overlay; | |
f_desk_image = "overlays/" + w_courtroom->server_overlay; |
src/aolayer.cpp
Outdated
QString final_path = ""; | ||
if (!desk) { | ||
final_path = ao_app->get_image_suffix(ao_app->get_background_path(p_filename)); | ||
} | ||
else { | ||
if (file_exists(ao_app->get_image_suffix(ao_app->get_background_path(p_filename)))) { | ||
final_path = ao_app->get_image_suffix(ao_app->get_background_path(p_filename)); | ||
} | ||
else { | ||
final_path = ao_app->get_image_suffix(VPath("overlays/" + p_filename)); | ||
} | ||
} |
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.
All of this should be done in get_pos_path, not here.
src/aolayer.cpp
Outdated
@@ -144,7 +144,7 @@ void AOLayer::move_and_center(int ax, int ay) | |||
center_pixmap(movie_frames[0]); // just use the first frame since dimensions are all that matter | |||
} | |||
|
|||
void BackgroundLayer::load_image(QString p_filename) | |||
void BackgroundLayer::load_image(QString p_filename, bool desk) |
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.
Why is bool desk necessary?
include/aolayer.h
Outdated
@@ -178,7 +178,7 @@ class BackgroundLayer : public AOLayer { | |||
Q_OBJECT | |||
public: | |||
BackgroundLayer(QWidget *p_parent, AOApplication *p_ao_app); | |||
void load_image(QString p_filename); | |||
void load_image(QString p_filename, bool desk = false); |
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.
Why is bool desk necessary?
src/path_functions.cpp
Outdated
@@ -140,13 +140,17 @@ QString AOApplication::get_pos_path(const QString& pos, const bool desk) | |||
QString desk_override = read_design_ini("overlays/" + f_background, get_background_path("design.ini")); |
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.
design_ini override is checked here. But overlays/ folder override is only checked after the image is attempted to be loaded, inside the background layer itself? Doesn't that order betray the PR description?
* You refer to a pos inside of the current BG * You refer to an overlay folder and want to draw pos from it depending on your current pos * You refer to a pos inside of an overlay folder Add DRO client positions.ini support Fix niche issues where background is not shown, or where pos_remove button doesn't appear (for example, if the chara's default pos is not present on the current dropdown list)
* Fix overlays being impossible to clear
Now is possible to load overlays in a specific folder inside base folder called overlays.
In this folder should be every general overlays.
Right now overlays load priority is:
Folder written in design.ini > overlays in specific background folder > overlays folder