Ejemplo n.º 1
0
    def __set_properties(self):
        self.SetScrollRate(10, 10)

        # Circle shape labels
        format.align_labels([self.label_radius, self.label_circle_height])

        # Polygon shape labels
        format.align_labels(
            [self.label_length, self.label_width, self.label_polygon_height])
Ejemplo n.º 2
0
    def __set_properties(self):
        # Align labels
        format.align_labels(
            [self.label_event, self.label_material, self.label_id])

        # Fill sound id list
        lib = servers.get_sound_library()
        for i in range(lib.getnumberofsounds()):
            if self.list_ids.FindString(lib.getsoundid(i)) == wx.NOT_FOUND:
                self.list_ids.Append(lib.getsoundid(i))

        self.__update_button_add()
Ejemplo n.º 3
0
 def __set_properties(self):
     self.SetScrollRate(10, 10)
     
     # Circle shape labels
     format.align_labels([
         self.label_radius,
         self.label_circle_height
         ])
     
     # Polygon shape labels
     format.align_labels([
         self.label_length,
         self.label_width,
         self.label_polygon_height
         ])
Ejemplo n.º 4
0
 def __set_properties(self):
     # Align labels
     format.align_labels([
         self.label_event,
         self.label_material,
         self.label_id
         ])
     
     # Fill sound id list
     lib = servers.get_sound_library()
     for i in range( lib.getnumberofsounds() ):
         if self.list_ids.FindString(lib.getsoundid(i)) == wx.NOT_FOUND :
             self.list_ids.Append( lib.getsoundid(i) )
     
     self.__update_button_add()
Ejemplo n.º 5
0
 def __set_properties(self):
     format.align_labels( [self.label_min, self.label_max] )
     self.button_ok.SetDefault()
Ejemplo n.º 6
0
 def __set_properties(self):
     format.align_labels([self.label_event, self.label_filter])
     self.__update_filter_list()
Ejemplo n.º 7
0
 def __set_properties(self):
     format.align_labels( [self.label_event, self.label_filter] )
     self.__update_filter_list()
Ejemplo n.º 8
0
 def __set_properties(self):
     self.button_ok.SetDefault()
     format.align_labels( [ self.label_name, self.label_description ] )
Ejemplo n.º 9
0
 def __set_properties(self):
     # default projection
     self.choice_projection.SetSelection(0)
     
     # allowed UV size values
     outdoor = app.get_outdoor()
     min_value = 0.25
     self.max_uvsize = outdoor.getheightmap().getgridscale() * \
                        (outdoor.getblocksize() - 1)
     while min_value <= self.max_uvsize:
         self.choice_u.Append( str(min_value) )
         self.choice_v.Append( str(min_value) )
         min_value = min_value * 2
     
     # valid texture files
     self.__update_combo_local_texture()
     
     # default texture files
     self.button_shared_texture.SetLabel(
         "dds/ground/cesped_test_terrain.dds" 
         )
     if self.combo_local_texture.GetCount() == 0:
         self.radio_local_texture.Enable(False)
     else:
         self.combo_local_texture.SetSelection(0)
     self.radio_local_texture.SetValue(False)
     self.radio_shared_texture.SetValue(True)
     
     # default UV size
     self.choice_u.SetValue("1.0")
     self.choice_v.SetValue("1.0")
     
     # align texture box fields by setting all labels to longest length
     format.align_labels([
         self.radio_local_texture,
         self.radio_shared_texture,
         self.label_u,
         self.label_projection
         ])
     
     # valid game materials
     self.__update_game_materials_choicer()
     
     # current settings
     if self.layer_ctrl is not None:
         self.text_name.SetValue( self.layer_ctrl.get_layer_name() )
         mangled_path = format.mangle_path(
                                 self.layer_ctrl.get_texture_filename() 
                                 )
         mangled_local_dir = format.mangle_path( self.get_textures_path() )
         mangled_shared_dir = format.mangle_path( self.get_shared_path() )
         if mangled_path.startswith( mangled_local_dir ):
             self.combo_local_texture.SetStringSelection(
                 format.get_relative_path( mangled_local_dir, mangled_path )
                 )
             self.radio_shared_texture.SetValue(False)
             self.radio_local_texture.SetValue(True)
         else:
             self.button_shared_texture.SetLabel(
                 format.get_relative_path( mangled_shared_dir, mangled_path )
                 )
             self.radio_local_texture.SetValue(False)
             self.radio_shared_texture.SetValue(True)
         uv_scale = self.layer_ctrl.get_uv_scale()
         self.choice_u.SetValue( str( self.uvscale2size(uv_scale[0]) ) )
         self.choice_v.SetValue( str( self.uvscale2size(uv_scale[1]) ) )
         self.choice_projection.SetSelection(
             self.layer_ctrl.get_projection()
             )
         color = self.layer_ctrl.get_color_mask().Get()
         self.color_sel.set_value(color)
Ejemplo n.º 10
0
 def __set_properties(self):
     format.align_labels([self.label_min, self.label_max])
     self.button_ok.SetDefault()
Ejemplo n.º 11
0
    def __set_properties(self):
        # default projection
        self.choice_projection.SetSelection(0)

        # allowed UV size values
        outdoor = app.get_outdoor()
        min_value = 0.25
        self.max_uvsize = outdoor.getheightmap().getgridscale() * \
                           (outdoor.getblocksize() - 1)
        while min_value <= self.max_uvsize:
            self.choice_u.Append(str(min_value))
            self.choice_v.Append(str(min_value))
            min_value = min_value * 2

        # valid texture files
        self.__update_combo_local_texture()

        # default texture files
        self.button_shared_texture.SetLabel(
            "dds/ground/cesped_test_terrain.dds")
        if self.combo_local_texture.GetCount() == 0:
            self.radio_local_texture.Enable(False)
        else:
            self.combo_local_texture.SetSelection(0)
        self.radio_local_texture.SetValue(False)
        self.radio_shared_texture.SetValue(True)

        # default UV size
        self.choice_u.SetValue("1.0")
        self.choice_v.SetValue("1.0")

        # align texture box fields by setting all labels to longest length
        format.align_labels([
            self.radio_local_texture, self.radio_shared_texture, self.label_u,
            self.label_projection
        ])

        # valid game materials
        self.__update_game_materials_choicer()

        # current settings
        if self.layer_ctrl is not None:
            self.text_name.SetValue(self.layer_ctrl.get_layer_name())
            mangled_path = format.mangle_path(
                self.layer_ctrl.get_texture_filename())
            mangled_local_dir = format.mangle_path(self.get_textures_path())
            mangled_shared_dir = format.mangle_path(self.get_shared_path())
            if mangled_path.startswith(mangled_local_dir):
                self.combo_local_texture.SetStringSelection(
                    format.get_relative_path(mangled_local_dir, mangled_path))
                self.radio_shared_texture.SetValue(False)
                self.radio_local_texture.SetValue(True)
            else:
                self.button_shared_texture.SetLabel(
                    format.get_relative_path(mangled_shared_dir, mangled_path))
                self.radio_local_texture.SetValue(False)
                self.radio_shared_texture.SetValue(True)
            uv_scale = self.layer_ctrl.get_uv_scale()
            self.choice_u.SetValue(str(self.uvscale2size(uv_scale[0])))
            self.choice_v.SetValue(str(self.uvscale2size(uv_scale[1])))
            self.choice_projection.SetSelection(
                self.layer_ctrl.get_projection())
            color = self.layer_ctrl.get_color_mask().Get()
            self.color_sel.set_value(color)
Ejemplo n.º 12
0
 def __set_properties(self):
     self.button_ok.SetDefault()
     format.align_labels([self.label_name, self.label_description])