-
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
Changes from 9 commits
0571ac6
d083e64
aa655ce
933d375
a135177
df760e1
1f5a3ad
279c1df
169a759
9b719ad
f4eb533
70afdb9
61b0322
b85778e
8462dc7
a451aba
8c02a6a
ef67e9a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Why is bool desk necessary? |
||
{ | ||
play_once = false; | ||
cull_image = false; | ||
|
@@ -155,7 +155,18 @@ void BackgroundLayer::load_image(QString p_filename) | |
#ifdef DEBUG_MOVIE | ||
qDebug() << "[BackgroundLayer] BG loaded: " << p_filename; | ||
#endif | ||
QString final_path = ao_app->get_image_suffix(ao_app->get_background_path(p_filename)); | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. All of this should be done in get_pos_path, not here. |
||
|
||
if (final_path == last_path) { | ||
// Don't restart background if background is unchanged | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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 commentThe 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? |
||||||
if (desk_override != "") { | ||||||
f_desk_image = desk_override; | ||||||
} else if (w_courtroom->server_overlay != "") { // BN+ Packet | ||||||
} | ||||||
else if (w_courtroom->server_overlay != "") { // BN+ Packet | ||||||
if (file_exists(get_image_suffix( | ||||||
get_background_path(w_courtroom->server_overlay)))) | ||||||
{ | ||||||
get_background_path(w_courtroom->server_overlay)))) { | ||||||
f_desk_image = w_courtroom->server_overlay; | ||||||
} | ||||||
} | ||||||
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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
} | ||||||
} | ||||||
if (desk) { | ||||||
return f_desk_image; | ||||||
} | ||||||
|
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?