OSDN Git Service

UIListでスクロールバーをクリックした時、下の項目も反応してしまう問題を修正
authorh2so5 <h2so5@git.sourceforge.jp>
Wed, 3 Oct 2012 12:19:36 +0000 (21:19 +0900)
committerh2so5 <h2so5@git.sourceforge.jp>
Wed, 3 Oct 2012 12:19:36 +0000 (21:19 +0900)
モデルなしのパッケージも生成するようにpackage.pyを変更

client/ui/UIList.cpp
package.py

index 554514e..a03001f 100644 (file)
@@ -158,6 +158,8 @@ void UIList::DefineInstanceTemplate(Handle<ObjectTemplate>* object)
 
 void UIList::ProcessInput(InputManager* input)
 {
+    UpdateScrollBar(input);
+
     BOOST_FOREACH (UIBasePtr& item_ptr, items_) {
                if (input->GetMousePos().second > absolute_y() && 
                        input->GetMousePos().second < absolute_y() + absolute_height()) {
@@ -165,7 +167,6 @@ void UIList::ProcessInput(InputManager* input)
                }
     }
 
-    UpdateScrollBar(input);
 }
 
 void UIList::UpdateScrollBar(InputManager* input)
index f0510d2..2253a7b 100644 (file)
@@ -6,7 +6,7 @@ import re
 base_dir = os.path.dirname(__file__)
 subprocess.call('Devenv "' + os.path.join(base_dir, 'mmo.sln') + '" /build release', shell=True)
 
-def make_full_package():
+def make_full_package(model = True):
        version_header = open(os.path.join(base_dir, 'client/version.hpp')).read()
        ver_major =    re.search("#define MMO_VERSION_MAJOR\s+(\d+)", version_header).group(1)
        ver_minor =    re.search("#define MMO_VERSION_MINOR\s+(\d+)", version_header).group(1)
@@ -20,8 +20,12 @@ def make_full_package():
            build_version_header = open(build_version_path).read()
            ver_build =    re.search("#define MMO_VERSION_BUILD\s+(\d+)", build_version_header).group(1)
            ver_text += "_" + ver_build
-
-       zip_path = os.path.join(base_dir, "mmo-" + ver_text + ".zip")
+           
+       if (model):
+               zip_path = os.path.join(base_dir, "mmo-" + ver_text + ".zip")
+       else:
+               zip_path = os.path.join(base_dir, "mmo-nomodel-" + ver_text + ".zip")
+               
        zip = zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED)
 
        bin_path = os.path.join(base_dir, 'client/bin/')
@@ -42,11 +46,14 @@ def make_full_package():
                relative_path = os.path.relpath(absolute_path, bin_path)
                zip.write(absolute_path, relative_path)
                
-       for root, dirs, files in os.walk(os.path.join(bin_path, 'models')):
-           for file in files:
-               absolute_path = os.path.join(root, file)
-               relative_path = os.path.relpath(absolute_path, bin_path)
-               zip.write(absolute_path, relative_path)
+       if (model):
+               for root, dirs, files in os.walk(os.path.join(bin_path, 'models')):
+                   for file in files:
+                       absolute_path = os.path.join(root, file)
+                       relative_path = os.path.relpath(absolute_path, bin_path)
+                       zip.write(absolute_path, relative_path)
+       else:
+               zip.writestr('models/', '')
                
        for root, dirs, files in os.walk(os.path.join(bin_path, 'motions')):
            for file in files:
@@ -92,5 +99,6 @@ def make_server_package():
                
        zip.close()
        
-make_full_package();
+make_full_package(True);
+make_full_package(False);
 make_server_package();
\ No newline at end of file