mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
tweaking gui
This commit is contained in:
parent
8e651c8f8e
commit
bcbd40848d
@ -253,7 +253,6 @@ thread_run() {
|
|||||||
|
|
||||||
double last_progress = -1.0;
|
double last_progress = -1.0;
|
||||||
|
|
||||||
_loop_started = GetTickCount();
|
|
||||||
MSG msg;
|
MSG msg;
|
||||||
int retval;
|
int retval;
|
||||||
retval = GetMessage(&msg, NULL, 0, 0);
|
retval = GetMessage(&msg, NULL, 0, 0);
|
||||||
@ -281,8 +280,7 @@ thread_run() {
|
|||||||
if (got_install && install_progress != last_progress) {
|
if (got_install && install_progress != last_progress) {
|
||||||
if (_progress_bar == NULL) {
|
if (_progress_bar == NULL) {
|
||||||
// Is it time to create the progress bar?
|
// Is it time to create the progress bar?
|
||||||
int now = GetTickCount();
|
if (!_install_label.empty()) {
|
||||||
if (now - _loop_started > 2000) {
|
|
||||||
make_progress_bar();
|
make_progress_bar();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -464,8 +462,8 @@ update_install_label(const string &install_label) {
|
|||||||
int bar_height = min((int)(height * 0.1), 24);
|
int bar_height = min((int)(height * 0.1), 24);
|
||||||
int bar_y = (height - bar_height * 2);
|
int bar_y = (height - bar_height * 2);
|
||||||
|
|
||||||
int text_width = text_size.cx;
|
int text_width = text_size.cx + 4;
|
||||||
int text_height = text_size.cy;
|
int text_height = text_size.cy + 2;
|
||||||
int text_x = (width - text_width) / 2;
|
int text_x = (width - text_width) / 2;
|
||||||
int text_y = bar_y - text_height - 2;
|
int text_y = bar_y - text_height - 2;
|
||||||
|
|
||||||
@ -692,7 +690,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
|
|||||||
SetBkColor(dis->hDC, 0x00ffffff);
|
SetBkColor(dis->hDC, 0x00ffffff);
|
||||||
|
|
||||||
DrawText(dis->hDC, text_buffer, -1, &(dis->rcItem),
|
DrawText(dis->hDC, text_buffer, -1, &(dis->rcItem),
|
||||||
DT_BOTTOM | DT_CENTER | DT_SINGLELINE);
|
DT_VCENTER | DT_CENTER | DT_SINGLELINE);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -73,8 +73,6 @@ private:
|
|||||||
double _install_progress;
|
double _install_progress;
|
||||||
LOCK _install_lock;
|
LOCK _install_lock;
|
||||||
|
|
||||||
int _loop_started;
|
|
||||||
|
|
||||||
bool _thread_continue;
|
bool _thread_continue;
|
||||||
bool _thread_running;
|
bool _thread_running;
|
||||||
HANDLE _thread;
|
HANDLE _thread;
|
||||||
|
@ -395,7 +395,7 @@ class Packager:
|
|||||||
package = self.packager.findPackage(packageName, platform = platform, version = version, requires = self.requires)
|
package = self.packager.findPackage(packageName, platform = platform, version = version, requires = self.requires)
|
||||||
if package:
|
if package:
|
||||||
self.requires.append(package)
|
self.requires.append(package)
|
||||||
xrequires = xrequires.NextSiblingElement()
|
xrequires = xrequires.NextSiblingElement('requires')
|
||||||
|
|
||||||
self.targetFilenames = {}
|
self.targetFilenames = {}
|
||||||
xcomponent = xpackage.FirstChildElement('component')
|
xcomponent = xpackage.FirstChildElement('component')
|
||||||
@ -403,7 +403,7 @@ class Packager:
|
|||||||
name = xcomponent.Attribute('filename')
|
name = xcomponent.Attribute('filename')
|
||||||
if name:
|
if name:
|
||||||
self.targetFilenames[name] = True
|
self.targetFilenames[name] = True
|
||||||
xcomponent = xcomponent.NextSiblingElement()
|
xcomponent = xcomponent.NextSiblingElement('component')
|
||||||
|
|
||||||
self.moduleNames = {}
|
self.moduleNames = {}
|
||||||
xmodule = xpackage.FirstChildElement('module')
|
xmodule = xpackage.FirstChildElement('module')
|
||||||
@ -411,7 +411,7 @@ class Packager:
|
|||||||
moduleName = xmodule.Attribute('name')
|
moduleName = xmodule.Attribute('name')
|
||||||
if moduleName:
|
if moduleName:
|
||||||
self.moduleNames[moduleName] = True
|
self.moduleNames[moduleName] = True
|
||||||
xmodule = xmodule.NextSiblingElement()
|
xmodule = xmodule.NextSiblingElement('module')
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user