mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 03:15:07 -04:00
rename save_screenshot -> save_screenshot_default to prevent confusion
This commit is contained in:
parent
f4d29cf30b
commit
7b6594acac
@ -267,7 +267,7 @@ get_display_region(int n) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GraphicsOutput::save_screenshot
|
// Function: GraphicsOutput::save_screenshot_default
|
||||||
// Access: Published
|
// Access: Published
|
||||||
// Description: Saves a screenshot of the window to a default
|
// Description: Saves a screenshot of the window to a default
|
||||||
// filename, and returns the filename, or empty string
|
// filename, and returns the filename, or empty string
|
||||||
@ -282,7 +282,7 @@ get_display_region(int n) const {
|
|||||||
// All other % strings in strftime().
|
// All other % strings in strftime().
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
Filename GraphicsOutput::
|
Filename GraphicsOutput::
|
||||||
save_screenshot(const string &prefix) {
|
save_screenshot_default(const string &prefix) {
|
||||||
time_t now = time(NULL);
|
time_t now = time(NULL);
|
||||||
struct tm *ttm = localtime(&now);
|
struct tm *ttm = localtime(&now);
|
||||||
int frame_count = ClockObject::get_global_clock()->get_frame_count();
|
int frame_count = ClockObject::get_global_clock()->get_frame_count();
|
||||||
|
@ -87,7 +87,7 @@ PUBLISHED:
|
|||||||
int get_num_display_regions() const;
|
int get_num_display_regions() const;
|
||||||
DisplayRegion *get_display_region(int n) const;
|
DisplayRegion *get_display_region(int n) const;
|
||||||
|
|
||||||
Filename save_screenshot(const string &prefix = "screenshot");
|
Filename save_screenshot_default(const string &prefix = "screenshot");
|
||||||
bool save_screenshot(const Filename &filename);
|
bool save_screenshot(const Filename &filename);
|
||||||
bool get_screenshot(PNMImage &image);
|
bool get_screenshot(PNMImage &image);
|
||||||
|
|
||||||
|
@ -1090,7 +1090,7 @@ event_f9(CPT_Event event, void *data) {
|
|||||||
self->_engine.render_frame();
|
self->_engine.render_frame();
|
||||||
}
|
}
|
||||||
|
|
||||||
Filename filename = wf->get_graphics_window()->save_screenshot();
|
Filename filename = wf->get_graphics_window()->save_screenshot_default();
|
||||||
string text;
|
string text;
|
||||||
if (filename.empty()) {
|
if (filename.empty()) {
|
||||||
text = "Screenshot failed";
|
text = "Screenshot failed";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user