瀏覽代碼

eliminate old win_height, win_width, win_origin_x, win_origin_y

David Rose 20 年之前
父節點
當前提交
d502a2489e
共有 3 個文件被更改,包括 6 次插入32 次删除
  1. 1 13
      panda/src/display/config_display.cxx
  2. 0 4
      panda/src/display/config_display.h
  3. 5 15
      panda/src/display/windowProperties.cxx

+ 1 - 13
panda/src/display/config_display.cxx

@@ -184,22 +184,10 @@ ConfigVariableInt win_size
           "replaces the deprecated win-width and win-height variables."));
 
 ConfigVariableInt win_origin
-("win-origin", "0 0",
+("win-origin", "",
  PRC_DESC("This is the default position at which to open a new window.  This "
           "replaces the deprecated win-origin-x and win-origin-y variables."));
 
-ConfigVariableInt win_width
-("win-width", 0);
-
-ConfigVariableInt win_height
-("win-height", 0);
-
-ConfigVariableInt win_origin_x
-("win-origin-x", 0);
-
-ConfigVariableInt win_origin_y
-("win-origin-y", 0);
-
 ConfigVariableBool fullscreen
 ("fullscreen", false);
 

+ 0 - 4
panda/src/display/config_display.h

@@ -63,10 +63,6 @@ extern EXPCL_PANDA ConfigVariableBool color_scale_via_lighting;
 
 extern EXPCL_PANDA ConfigVariableInt win_size;
 extern EXPCL_PANDA ConfigVariableInt win_origin;
-extern EXPCL_PANDA ConfigVariableInt win_width;
-extern EXPCL_PANDA ConfigVariableInt win_height;
-extern EXPCL_PANDA ConfigVariableInt win_origin_x;
-extern EXPCL_PANDA ConfigVariableInt win_origin_y;
 extern EXPCL_PANDA ConfigVariableBool fullscreen;
 extern EXPCL_PANDA ConfigVariableBool undecorated;
 extern EXPCL_PANDA ConfigVariableBool cursor_hidden;

+ 5 - 15
panda/src/display/windowProperties.cxx

@@ -61,23 +61,13 @@ get_default() {
 
   props.set_open(true);
 
-  if (win_width.has_value() && win_height.has_value() &&
-      !win_size.has_value()) {
-    props.set_size(win_width, win_height);
-
-  } else {
-    if (win_size.get_num_words() == 1) {
-      props.set_size(win_size[0], win_size[0]);
-    } else {
-      props.set_size(win_size[0], win_size[1]);
-    }
+  if (win_size.get_num_words() == 1) {
+    props.set_size(win_size[0], win_size[0]);
+  } else if (win_size.get_num_words() >= 2) {
+    props.set_size(win_size[0], win_size[1]);
   }
 
-  if (win_origin_x.has_value() && win_origin_y.has_value() && 
-      !win_origin.has_value()) {
-    props.set_origin(win_origin_x, win_origin_y);
-
-  } else {
+  if (win_origin.get_num_words() >= 2) {
     props.set_origin(win_origin[0], win_origin[1]);
   }