You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
Bring that Whole New World to the Old Continent too
Applies the clang-format style to the 2.1 branch as done for master in
5dbf1809c6.
This commit is contained in:
@@ -29,15 +29,14 @@
|
||||
#ifndef PROGRESS_DIALOG_H
|
||||
#define PROGRESS_DIALOG_H
|
||||
|
||||
#include "scene/gui/popup.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/progress_bar.h"
|
||||
#include "scene/gui/label.h"
|
||||
|
||||
#include "scene/gui/popup.h"
|
||||
#include "scene/gui/progress_bar.h"
|
||||
|
||||
class BackgroundProgress : public HBoxContainer {
|
||||
|
||||
OBJ_TYPE(BackgroundProgress,HBoxContainer);
|
||||
OBJ_TYPE(BackgroundProgress, HBoxContainer);
|
||||
|
||||
_THREAD_SAFE_CLASS_
|
||||
|
||||
@@ -45,59 +44,53 @@ class BackgroundProgress : public HBoxContainer {
|
||||
|
||||
HBoxContainer *hb;
|
||||
ProgressBar *progress;
|
||||
|
||||
};
|
||||
|
||||
Map<String,Task> tasks;
|
||||
Map<String,int> updates;
|
||||
Map<String, Task> tasks;
|
||||
Map<String, int> updates;
|
||||
void _update();
|
||||
|
||||
protected:
|
||||
|
||||
void _add_task(const String& p_task,const String& p_label, int p_steps);
|
||||
void _task_step(const String& p_task, int p_step=-1);
|
||||
void _end_task(const String& p_task);
|
||||
void _add_task(const String &p_task, const String &p_label, int p_steps);
|
||||
void _task_step(const String &p_task, int p_step = -1);
|
||||
void _end_task(const String &p_task);
|
||||
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
void add_task(const String& p_task,const String& p_label, int p_steps);
|
||||
void task_step(const String& p_task, int p_step=-1);
|
||||
void end_task(const String& p_task);
|
||||
void add_task(const String &p_task, const String &p_label, int p_steps);
|
||||
void task_step(const String &p_task, int p_step = -1);
|
||||
void end_task(const String &p_task);
|
||||
|
||||
BackgroundProgress() {}
|
||||
};
|
||||
|
||||
|
||||
|
||||
class ProgressDialog : public Popup {
|
||||
|
||||
OBJ_TYPE( ProgressDialog, Popup );
|
||||
OBJ_TYPE(ProgressDialog, Popup);
|
||||
struct Task {
|
||||
|
||||
String task;
|
||||
VBoxContainer *vb;
|
||||
ProgressBar *progress;
|
||||
Label *state;
|
||||
|
||||
};
|
||||
|
||||
Map<String,Task> tasks;
|
||||
Map<String, Task> tasks;
|
||||
VBoxContainer *main;
|
||||
uint64_t last_progress_tick;
|
||||
|
||||
static ProgressDialog *singleton;
|
||||
void _popup();
|
||||
|
||||
protected:
|
||||
|
||||
void _notification(int p_what);
|
||||
|
||||
public:
|
||||
|
||||
static ProgressDialog *get_singleton() { return singleton; }
|
||||
void add_task(const String& p_task,const String& p_label, int p_steps);
|
||||
void task_step(const String& p_task, const String& p_state, int p_step=-1, bool p_force_redraw=true);
|
||||
void end_task(const String& p_task);
|
||||
|
||||
void add_task(const String &p_task, const String &p_label, int p_steps);
|
||||
void task_step(const String &p_task, const String &p_state, int p_step = -1, bool p_force_redraw = true);
|
||||
void end_task(const String &p_task);
|
||||
|
||||
ProgressDialog();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user