CN111309215A - Processing method, device, equipment and storage medium of sliding list in Unity - Google Patents

Processing method, device, equipment and storage medium of sliding list in Unity Download PDF

Info

Publication number
CN111309215A
CN111309215A CN202010064429.2A CN202010064429A CN111309215A CN 111309215 A CN111309215 A CN 111309215A CN 202010064429 A CN202010064429 A CN 202010064429A CN 111309215 A CN111309215 A CN 111309215A
Authority
CN
China
Prior art keywords
display
list
list item
sliding
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010064429.2A
Other languages
Chinese (zh)
Inventor
程思鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Mihoyo Tianming Technology Co Ltd
Original Assignee
Shanghai Mihoyo Tianming Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Mihoyo Tianming Technology Co Ltd filed Critical Shanghai Mihoyo Tianming Technology Co Ltd
Priority to CN202010064429.2A priority Critical patent/CN111309215A/en
Publication of CN111309215A publication Critical patent/CN111309215A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/403D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses a method, a device, equipment and a storage medium for processing a sliding list in Unity. The method comprises the following steps: determining the number of list items to be displayed according to the size of a display area and the size of the list items in the Unity sliding list; obtaining loading data of each display list item according to the number of the list items; and generating each display list item according to the display list item loading data, and displaying each display list item in a row to finish the drawing of the sliding list. Through the technical scheme, the sliding list can be displayed more efficiently, and the waiting time for the first operation of the sliding list is reduced.

Description

Processing method, device, equipment and storage medium of sliding list in Unity
Technical Field
The embodiment of the invention relates to a game development technology, in particular to a method, a device, equipment and a storage medium for processing a sliding list in Unity.
Background
Unity3D is a comprehensive game development tool developed by Unity Technologies that allows players to easily create multiple platforms of types of interactive content, such as three-dimensional video games, building visualizations, real-time three-dimensional animations, etc., and is a fully integrated professional game engine.
Referring to fig. 1, a slide list 100 in a Unity native User Interface (UI) is composed of a display area (Viewport)101 and a Content area (Content) 102. The Content area (Content) includes all list items (item)103 that need to be displayed in the development item, and the display area (Viewport)101 displays a part of all list items. The user may operate the slide list by dragging the Content area Content up and down or horizontally so that different list items are displayed in the display area Viewport.
The problem with the above sliding list is: all list items need to be loaded into the Content area Content at one time, so that the initialization time of the sliding list is longer, and the blockage is caused when more list items exist.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a storage medium for processing a sliding list in Unity, so as to achieve more efficient display of the sliding list and reduce the waiting time for the first operation of the sliding list.
In a first aspect, an embodiment of the present invention provides a method for processing a sliding list in Unity, including:
determining the number of list items to be displayed according to the size of a display area and the size of the list items in the Unity sliding list;
obtaining loading data of each display list item according to the number of the list items;
and generating each display list item according to the display list item loading data, and displaying each display list item in a row to finish the drawing of the sliding list.
In a second aspect, an embodiment of the present invention further provides an apparatus for processing a sliding list in Unity, where the apparatus includes:
the list item number determining module is used for determining the number of list items to be displayed according to the size of the display area and the size of the list items in the Unity sliding list;
the display list item loading data acquisition module is used for acquiring the loading data of each display list item according to the number of the list items;
and the sliding list drawing module is used for generating each display list item according to the display list item loading data, and displaying each display list item in a row to finish drawing of the sliding list.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method for processing a sliding list in Unity provided by any embodiment of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for processing a sliding list in Unity provided in any embodiment of the present invention.
The embodiment of the invention determines the number of list items to be displayed according to the size of the display area and the size of the list items in the Unity sliding list; obtaining loading data of each display list item according to the number of the list items; and generating each display list item according to the display list item loading data, and displaying the display list items in a row to finish the drawing of the sliding list. When the sliding list is drawn for the first time, only the displayable display list items in the display area of the sliding list are loaded, and the loading of all the display list items is avoided, so that the initial time of the first running of the sliding list is shortened, the blocking condition of the sliding list is reduced, and the drawing efficiency of the sliding list is improved.
Drawings
FIG. 1 is a diagram illustrating a display of a native slide list in Untiy in the prior art;
FIG. 2 is a flowchart of a method for processing a sliding list in Unity according to a first embodiment of the present invention;
FIG. 3 is a schematic diagram of a slide list display according to a first embodiment of the present invention;
FIG. 4 is a diagram illustrating a specific display effect of a sliding list according to a first embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating an effect of setting an initial dragging position of a sliding list according to a first embodiment of the present invention;
FIG. 6 is a flowchart of a method for processing a sliding list in Unity according to a second embodiment of the present invention;
fig. 7 is a schematic diagram of an additional list item and a list item to be removed when the list area slides upwards in the second embodiment of the present invention;
fig. 8 is a schematic diagram of an additional list item and a list item to be removed when the list area slides down in the second embodiment of the present invention;
fig. 9 is a schematic diagram illustrating a display of a slide list after a slide operation is performed on the slide list in the second embodiment of the present invention;
FIG. 10 is a schematic structural diagram of a processing apparatus for sliding lists in Unity according to a third embodiment of the present invention;
fig. 11 is a schematic structural diagram of an electronic device in the fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
The processing method of the sliding list in Unity provided in this embodiment is applicable to the processing of initialization, sliding, user interactive refresh, and the like of the sliding list in Unity. The method can be executed by a processing device for sliding the list in Unity, which can be implemented by software and/or hardware, and the device can be integrated in an electronic device installed with a Unity editor, such as a typical user terminal device, for example, a notebook computer or a desktop computer. Referring to fig. 2, the method of the embodiment specifically includes:
and S110, determining the number of list items to be displayed according to the size of the display area and the size of the list items in the Unity sliding list.
The display area size refers to the size of the display area viewport in the slide list, and may be the display area height or the display area width. The display area size is fixed data in Unity. The list item size refers to the size of each list item in the sliding list, which may be a list item height or a list item width. The list item size is data set in advance. It should be noted that the display area size and the list item size are data with the same dimension, for example, if the display area size is the display area height, then the list item size is the list item height.
Specifically, in order to reduce the data load when drawing the sliding list, in this embodiment, the number of list items that can be displayed in the display area of the sliding list (i.e., the number of list items to be displayed) needs to be determined first. Firstly, acquiring the size of a display area and the size of a list item; the quotient of the display area size and the list item size is then calculated and can be used to determine the number of list items. For example, the quotient may be directly determined as the number of list items, or a preset number (e.g., a smaller value such as 1 or 2) may be added to the calculated quotient, and the sum is determined as the number of list items.
The display area size and the list item size in this process both depend on the sliding direction of the sliding list. For example, if the sliding direction is up and down sliding, the size of the display area is the height of the display area, and the size of the list item is the height of the list item; if the sliding direction is sliding left and right, the size of the display area is the width of the display area, and the size of the list item is the width of the list item.
And S120, obtaining the loading data of each display list item according to the number of the list items.
The display list item refers to a list item required to be displayed in the display area. List item load data refers to various data used to generate a list item. For example, when a game ranking list needs to be displayed in the sliding list, the list item loading data includes player information such as a player nickname, a player gender, a player rating, and a player avatar, ranking information, bonus information of the corresponding ranking, and the like. The display list item loading data refers to data used for generating a display list item.
Specifically, after the number of list items is determined, the display list item loading data of the number of list items may be obtained from a local storage space or a server storing all resource data.
Illustratively, obtaining the loading data of each display list item according to the number of the list items includes: and obtaining the loading data of each display list item according to the number of the list items and the identification of each display list item to be displayed.
The list item identifier refers to information uniquely representing one list item, and may be, for example, a storage index number index or a display sequence number of the list item. The display list item identification refers to a list item identification of a display list item.
Specifically, when the display list item loading data is obtained, in addition to the number of list items, which specific list item loading data needs to be loaded needs to be considered. And if the list item identification specified by the user exists, directly using the list item identification as the display list item identification. If the list item loading data is acquired for the first time, and the display list item identification is not specified in advance, the default display list item identification begins from index being 0, and the display list item identification is continuously increased to meet the number of the list items. If the user does not specify the list item identifier, but after the display list items are displayed for the first time, the user performs an interactive operation on the sliding list to trigger a change of the currently displayed display list items, then the display list item identifiers need to be determined according to an interactive result of the user. If the user slides the sliding list, a new display list item (i.e., an additional list item) needs to be loaded, and then a new list item identifier (i.e., an additional list item identifier) needs to be added in sequence based on the original display list item identifier. If the user triggers the removal operation of a certain display list item, if the user clicks and receives the ranking reward in the game ranking list, the user needs to delete the identifier of the display list item clicked by the user from each display list item identifier, and simultaneously, new list item identifiers are added in sequence.
After the number of the list items and the display list item identifications are determined, the corresponding display list item loading data can be searched and returned according to the display list item identifications.
And S130, generating display list items according to the display list item loading data, and displaying the display list items in a row to finish drawing of the sliding list.
Specifically, various data in the display list item loading data are assembled and rendered, and a display list item containing information such as a drawing/text can be generated. And then, arranging and displaying the display list items according to the ordering relation of the display list item identifications, and finishing the drawing of the sliding list.
Referring to fig. 3, if the display list item identifier is 0, 1, 2, 3, the display list item 103 displayed in the display area 101 of the slide list 100 is the list item with 0, 1, 2, 3 index, and there is no redundant display list item. It should be noted that, in this embodiment, the display list items in the slide list may be displayed from index being equal to 0, but may also be displayed from other display list items according to different display list item identifications.
Illustratively, the arranging and displaying of the display list items includes: displaying a first display list item arranged at a preset position of a display area in a first display size and a first display transparency; and determining the second display size and the second display transparency of each other display list item according to the distance, the first display size and the first display transparency between each other display list item except the first display list item in each display list item and the first display list item in other positions except the preset position in the display area, and displaying corresponding other display list items according to each second display size and each second display transparency.
The preset position is a position in a preset display area, and may be a display position corresponding to a midpoint of the display area, for example. The display size refers to the size of the display list item display. The first display size and the second display size are different display sizes, wherein the first display size is a preset numerical value, and the second display size is calculated according to the first display size. The display transparency refers to the transparency of the display list item, and the larger the transparency value is, the more perspective the display effect is. The first display transparency and the second display transparency are different transparencies, wherein the first display transparency is a preset numerical value, and the second display transparency is calculated according to the first display transparency.
Specifically, in this embodiment, when each display list item is displayed in the sliding list, the display effect of each display list item may be set, so that different display list items are presented with different display effects. In the present embodiment, a display list item at a preset position (i.e., a first display list item) is displayed according to a first display size and a first display transparency. The display size and the display transparency of the remaining display list items (i.e. other display list items) are calculated according to the first display size, the first display transparency and the distance between the first display size and the preset position. Referring to fig. 4, the preset position is a middle point 104 of the display area 101, and the first display size and the first display transparency are the maximum display size and the minimum transparency, respectively, so that the display list item "4" is displayed in the maximum display size and the opacity. And for the display list items "3" and "5" and the display list items "2" and "6", the display size is linearly reduced and the display transparency is linearly increased according to the spacing distance between the display list items "4", and the second display size and the second display transparency which correspond to each other are obtained through calculation and displayed. Therefore, the sliding list can show the display effect of maximum centering and respectively shrinking and fading out at two sides, and the display diversity of the sliding list is improved.
According to the technical scheme of the embodiment, the number of list items to be displayed is determined according to the size of a display area and the size of the list items in the Unity sliding list; obtaining loading data of each display list item according to the number of the list items; and generating each display list item according to the display list item loading data, and displaying the display list items in a row to finish the drawing of the sliding list. When the sliding list is drawn for the first time, only the displayable display list items in the display area of the sliding list are loaded, and the loading of all the display list items is avoided, so that the initial time of the first running of the sliding list is shortened, the blocking condition of the sliding list is reduced, and the drawing efficiency of the sliding list is improved.
On the basis of the above technical scheme, generate each display list item according to each display list item loading data, and arrange and display each display list item, after the drawing of the sliding list is completed, still include: and setting the corresponding boundary position of the list area corresponding to each display list item according to the size of the list item and the boundary position of the display area. The list area refers to a whole area formed by all displayed list items. The boundary position refers to position information (e.g., coordinates) of the boundary of an area. Referring to fig. 5, in the native slide list (a), the drag operation can be performed only from the start position 501 of the display area 101 to drag the display list items. However, in order to further increase the flexibility of the sliding list in this embodiment, the sliding list is modified so that the dragging can be started from a specific position or terminated to a specific position. In specific implementation, the starting boundary position of the list area may be set to a position that is an integer number of list item sizes away from the corresponding boundary position of the display area according to the sliding direction of the sliding list. For example, if the sliding direction is the list area sliding to the left, the starting drag position 502 of the modified sliding list (b) can be set to a position 1 list item width 503 away from the left boundary position of the display area 101. Likewise, the planting boundary position of the list area may be set to a position that is an integer number of list item sizes from the corresponding boundary position of the display area.
Example two
In this embodiment, on the basis of the first embodiment, steps of the sliding process of the sliding list are added. Wherein explanations of the same or corresponding terms as those of the above embodiments are omitted. Referring to fig. 6, the processing method of the sliding list in Unity provided in this embodiment includes:
s210, determining the number of list items to be displayed according to the size of the display area and the size of the list items in the Unity sliding list.
And S220, obtaining the loading data of each display list item according to the number of the list items.
And S230, generating each display list item according to the display list item loading data, and displaying the display list items in a row to finish drawing of the sliding list.
S240, when the sliding operation of the user on the sliding list is monitored, whether a new display list item is added to each display list item is determined according to the sliding direction, the display area boundary position of the display area and the list area boundary position corresponding to each display list item.
Specifically, in the embodiment of the present invention, all list items are not loaded at one time, so when the user slides the sliding list and the last displayed list item is displayed, new list item loading data needs to be continuously loaded to generate and display a new displayed list item, which may not affect the user experience. In specific implementation, the area boundary for position comparison between the display area and the list area is determined according to the sliding direction. Thereafter, a comparison of the region boundary positions may be used to determine whether the last display list item has been fully displayed, i.e., whether to add a new display list item to each display list item.
Exemplarily, S240 includes: when the sliding direction is that the list area corresponding to the list item slides to the side with smaller coordinate value in the area boundary position, if the maximum coordinate value in the display area boundary position is smaller than the maximum coordinate value in the list area boundary position, determining to add a new display list item to each display list item; and when the sliding direction is that the list area slides to the side with larger coordinate value in the area boundary position, if the minimum coordinate value in the display area boundary position is larger than the minimum coordinate value in the list area boundary position, determining to add a new display list item to each display list item.
Specifically, the display area and the list area each have a coordinate set for display positioning. Further, since the directions of the coordinate start points of the display area and the list area coincide with each other, the area boundary position may be the area boundary position of the display area or the area boundary position of the list area. In the embodiment of the invention, the sliding direction is determined by taking the movement of the list area as a reference. Referring to fig. 7, when the sliding direction is that the list area 105 is moved toward the side where the coordinate value is smaller in the area boundary position, i.e., the side where the list area min or the sliding area min is located, the sliding direction is that the list area 105 slides upward. At this time, the maximum coordinate value in the boundary position of the display area 101 (i.e., display area max) is compared with the maximum coordinate value in the boundary position of the list area 105 (i.e., list area max). If the display area max < list area max indicates that the last display list item in the list area has been fully displayed, a new display list item 106 needs to be added below the list area max. Referring to fig. 8, when the sliding direction is such that the list area 105 moves toward the side where the coordinate value is larger in the area boundary position, i.e., the side where the list area max or the sliding area max is located, the sliding direction is such that the list area 105 slides downward. At this time, the minimum coordinate value in the boundary position of the display area 101 (i.e., the display area min) is compared with the minimum coordinate value in the boundary position of the list area 105 (i.e., the list area min). If the display area min > the list area min, it indicates that the last display list item in the list area is completely displayed, and a new display list item 106 needs to be added above the list area min.
And S250, if so, determining an additional list item identifier according to the display list item identifier of the last display list item opposite to the sliding direction in each display list item, and obtaining additional list item loading data according to the additional list item identifier.
Specifically, when it is determined that a new display list item needs to be added, at least one identifier is sequentially determined according to the display list item identifier of the last display list item (i.e., the last display list item) and the sorting of the list item identifiers, and is used as an additional list item identifier. And then, searching the loading data corresponding to the corresponding list item according to the additional list item identifier and returning to obtain additional list item loading data.
And S260, generating an additional list item according to the additional list item loading data, using the additional list item as a new display list item, and refreshing the sliding list after the new display list item is arranged and displayed at the last display list item.
Specifically, the additional list item loading data is assembled and rendered, so that an additional list item, i.e., a new display list item, can be generated. Then, the new display list item is displayed in the last display list item of the list area, and the refreshing of the sliding list is completed.
S270, when the sliding operation of the user on the sliding list is monitored, whether the list item to be removed exists in each display list item is determined according to the sliding direction, the display area boundary position of the display area and the list area boundary position corresponding to each display list item.
Specifically, in order to make the number of list items in the list area as small as possible and to be able to recycle the components carrying the display list items, in this embodiment, the non-displayed display list items are timely recycled, and the components corresponding to the recycled display list items are used for the display of the additional list items in S240 to S260. In specific implementation, the area boundary for position comparison between the display area and the list area is also determined according to the sliding direction. Then, whether the display list item displayed firstly completely exceeds the display area can be determined through comparison of the area boundary positions, namely, whether a list item to be removed exists in all the display list items is determined. The list item to be removed is the display list item that is not displayed beyond the display area in the display list items.
Exemplarily, S270 includes: when the sliding direction is that the list area corresponding to the list item slides to the side with smaller coordinate value in the area boundary position, if the sum of the minimum coordinate value in the list area boundary position and a preset threshold value is larger than the minimum coordinate value in the display area boundary position, determining that the list item to be removed exists in each display list item; and when the sliding direction is that the list area slides to the side with larger coordinate value in the area boundary position, if the difference between the maximum coordinate value in the list area boundary position and the preset threshold value is larger than the maximum coordinate value in the display area boundary position, determining that the list item to be removed exists in each display list item.
The preset threshold is a preset numerical value which is slightly larger than 1 list item size but smaller than 2 times of the list item size.
Specifically, referring to fig. 7, when the sliding direction is the list area 105 moving toward the list area min or the side where the sliding area min is located (sliding up), the sum of the list area min and a preset threshold is compared with the display area min. If the (list area min + preset threshold value) > display area min indicates that the displayed list item displayed first completely exceeds the display area and cannot be displayed, it is determined that the list item to be removed 107 exists in each displayed list item at this time. Referring to fig. 8, when the sliding direction is the list area 105 moving (sliding down) to the list area max or the side where the sliding area max is located, the difference between the list area max and the preset threshold value and the display area max are compared. If (list area max-preset threshold) > display area max indicates that the displayed list item displayed first completely exceeds the display area and cannot be displayed, it is determined that the list item to be removed 107 exists in each displayed list item.
And S280, if the list item exists, removing the list item to be removed from each display list item, and storing the list item to be removed in a resource recycling pool.
Specifically, after the existence of the list item to be removed is determined, the list item to be removed is removed from each display list item, and the list item to be removed is stored in a local resource recycling pool instead of being directly destroyed, so that the list item to be removed is directly obtained from the resource recycling pool when the list item to be removed needs to be loaded again in the following process, and the reloading and assembling processes are reduced.
Referring to fig. 9, it is assumed that only 5 display list items with display list item identifications of 0, 1, 2, 3, and 4 are loaded when the slide list is drawn for the first time. In the sliding operation process of the user, after the display list items marked as 0 and 1 slide out of the display area, the corresponding display list items are removed, and the additional list items with the indexes of 5 and 6 are continuously loaded and are sequentially displayed.
It should be noted that S240 to S260 and S270 to S280 may be executed alternatively or in total, and the processing efficiency of the sliding list is higher when all are executed. In addition, when all the operations are performed, the order of performing S240 to S260 and S270 to S280 is not limited, and the operations may be performed sequentially, may be performed after S270 to S280 is performed, and may be performed simultaneously with S240 to S260.
It should be understood that, according to the sliding list drawing and sliding refresh processes in the embodiment of the present invention, it is known that the sliding list in the embodiment of the present invention displays each display list item according to the list item identifier, so that when the dragging is stopped, a complete display list item is displayed, instead of displaying only a part of the display list item.
According to the technical scheme of the embodiment, when the sliding operation of the user on the sliding list is monitored, whether a new display list item is added to each display list item is determined according to the sliding direction, the display area boundary position of the display area and the list area boundary position corresponding to each display list item; if so, determining an additional list item identifier according to the display list item identifier of the last display list item opposite to the sliding direction in each display list item, and obtaining additional list item loading data according to the additional list item identifier; and generating an additional list item according to the additional list item loading data, using the additional list item as a new display list item, and refreshing the sliding list after the last display list item is arranged and displayed. The method and the device have the advantages that the new display list items are added in real time after the user slides the sliding list, the user can not be influenced to check each display list item, the list item loading data loaded in the sliding list at the same time can be reduced, and therefore the processing efficiency of the sliding operation of the sliding list is improved. When the sliding operation of a user on the sliding list is monitored, determining whether the list item to be removed exists in each display list item according to the sliding direction, the display area boundary position of the display area and the list area boundary position corresponding to each display list item; and if so, removing the list items to be removed from the display list items and storing the list items to be removed in the resource recycling pool. The utility model has the advantages of realized that the user slides the back to the slip list, in time retrieve the demonstration list item that can't show, further reduced the list item loading data of loading simultaneously in the slip list, the demonstration list item that the usable resource recovery pond stored the loading simultaneously avoids the reprocess of the same list item, further improves the treatment effeciency of slip list slip operation.
EXAMPLE III
The present embodiment provides a device for processing a sliding list in Unity, and referring to fig. 10, the device specifically includes:
a list item number determining module 1010, configured to determine the number of list items to be displayed according to the size of the display area and the size of the list item in the Unity sliding list;
a display list item loading data obtaining module 1020, configured to obtain each display list item loading data according to the number of list items;
and the sliding list drawing module 1030 is configured to generate each display list item according to each display list item loading data, and display each display list item in a row to complete drawing of the sliding list.
Optionally, the display list item loading data obtaining module 1020 is specifically configured to:
and obtaining the loading data of each display list item according to the number of the list items and the identification of each display list item to be displayed.
Optionally, on the basis of the above apparatus, the apparatus further includes an additional list item display module, configured to:
generating display list items according to the display list item loading data, displaying the display list items in a row, and after drawing of a sliding list is completed, when the sliding operation of a user on the sliding list is monitored, determining whether to add a new display list item into each display list item according to the sliding direction, the display area boundary position of the display area and the list area boundary position corresponding to each display list item;
if so, determining an additional list item identifier according to the display list item identifier of the last display list item opposite to the sliding direction in each display list item, and obtaining additional list item loading data according to the additional list item identifier;
and generating an additional list item according to the additional list item loading data, using the additional list item as a new display list item, and refreshing the sliding list after the last display list item is arranged and displayed.
Optionally, on the basis of the above apparatus, the apparatus further includes a display list item removing module, configured to:
generating display list items according to the display list item loading data, displaying the display list items in a row, and after drawing of a sliding list is completed, when the sliding operation of a user on the sliding list is monitored, determining whether list items to be removed exist in the display list items according to the sliding direction, the display area boundary position of the display area and the list area boundary position corresponding to the display list items;
and if so, removing the list items to be removed from the display list items and storing the list items to be removed in the resource recycling pool.
Further, the additional list item display module is specifically configured to:
when the sliding direction is that the list area corresponding to the list item slides to the side with smaller coordinate value in the area boundary position, if the maximum coordinate value in the display area boundary position is smaller than the maximum coordinate value in the list area boundary position, determining to add a new display list item to each display list item;
when the sliding direction is that the list area slides to the side with larger coordinate value in the area boundary position, if the minimum coordinate value in the display area boundary position is larger than the minimum coordinate value in the list area boundary position, determining to add a new display list item to each display list item;
and/or the display list item removal module is specifically configured to:
when the sliding direction is that the list area corresponding to the list item slides to the side with smaller coordinate value in the area boundary position, if the sum of the minimum coordinate value in the list area boundary position and a preset threshold value is larger than the minimum coordinate value in the display area boundary position, determining that the list item to be removed exists in each display list item;
and when the sliding direction is that the list area slides to the side with larger coordinate value in the area boundary position, if the difference between the maximum coordinate value in the list area boundary position and the preset threshold value is larger than the maximum coordinate value in the display area boundary position, determining that the list item to be removed exists in each display list item.
Optionally, on the basis of the above apparatus, the apparatus further includes a dragging position setting module, configured to:
and after the drawing of the sliding list is finished, setting the corresponding boundary position of the list area corresponding to each display list item according to the size of the list item and the boundary position of the display area.
Optionally, the sliding list drawing module 1030 is specifically configured to:
displaying a first display list item arranged at a preset position of a display area in a first display size and a first display transparency;
and determining the second display size and the second display transparency of each other display list item according to the distance, the first display size and the first display transparency between each other display list item except the first display list item in each display list item and the first display list item in other positions except the preset position in the display area, and displaying corresponding other display list items according to each second display size and each second display transparency.
Through the processing device of the sliding list in Unity in the third embodiment of the invention, when the sliding list is drawn for the first time, only the display list items which can be displayed in the display area of the sliding list are loaded, and the loading of all the display list items is avoided, so that the initialization time of the first running of the sliding list is reduced, the jam condition of the sliding list is reduced, and the drawing efficiency of the sliding list is improved.
The processing device for the sliding list in Unity provided by the embodiment of the invention can execute the processing method for the sliding list in Unity provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the processing apparatus for sliding lists in Unity, the units and modules included in the embodiment are merely divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
Example four
Referring to fig. 11, the present embodiment provides an electronic device 1100, which includes: one or more processors 1120; the storage device 1110 is configured to store one or more programs, and when the one or more programs are executed by the one or more processors 1120, the one or more processors 1120 are enabled to implement the method for processing the sliding list in Unity provided by the embodiment of the present invention, including:
determining the number of list items to be displayed according to the size of a display area and the size of the list items in the Unity sliding list;
obtaining loading data of each display list item according to the number of the list items;
and generating each display list item according to the display list item loading data, and displaying each display list item in a row to finish the drawing of the sliding list.
Of course, those skilled in the art will understand that the processor 1120 can also implement the technical solution of the method for processing the sliding list in Unity provided by any embodiment of the present invention.
The electronic device 1100 shown in fig. 11 is only an example and should not bring any limitations to the function and the scope of use of the embodiments of the present invention.
As shown in fig. 11, electronic device 1100 is embodied in the form of a general purpose computing device. The components of the electronic device 1100 may include, but are not limited to: one or more processors 1120, a storage device 1110, and a bus 1150 that couples the various system components (including the storage device 1110 and the processors 1120).
Bus 1150 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MA11) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and peripheral component interconnect (P11I) bus.
Electronic device 1100 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 1100 and includes both volatile and nonvolatile media, removable and non-removable media.
Storage 1110 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)1111 and/or cache memory 1112. The electronic device 1100 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, the storage system 1113 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 11 and commonly referred to as a "hard drive"). Although not shown in FIG. 11, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., 11D-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be connected to bus 1150 by one or more data media interfaces. Storage 1110 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 1114 having a set (at least one) of program modules 1115 may be stored, for instance, in the storage 1110, such program modules 1115 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination may include an implementation of a network environment. The program modules 1115 generally perform the functions and/or methods described in any of the embodiments of the present invention.
The electronic device 1100 may also communicate with one or more external devices 1160 (e.g., keyboard, pointing device, display 1170, etc.), with one or more devices that enable a user to interact with the electronic device 1100, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 1100 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 1130. Also, the electronic device 1100 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet) via the network adapter 1140. As shown in fig. 11, the network adapter 1140 communicates with the other modules of the electronic device 1100 via the bus 1150. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
EXAMPLE five
The present embodiments provide a storage medium containing computer-executable instructions which, when executed by a computer processor, perform a method of processing a sliding list in Unity, the method comprising:
determining the number of list items to be displayed according to the size of a display area and the size of the list items in the Unity sliding list;
obtaining loading data of each display list item according to the number of the list items;
and generating each display list item according to the display list item loading data, and displaying each display list item in a row to finish the drawing of the sliding list.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the processing method of the sliding list in Unity provided by any embodiment of the present invention.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for processing a sliding list in Unity is characterized by comprising the following steps:
determining the number of list items to be displayed according to the size of a display area and the size of the list items in the Unity sliding list;
obtaining loading data of each display list item according to the number of the list items;
and generating each display list item according to the display list item loading data, and displaying each display list item in a row to finish the drawing of the sliding list.
2. The method according to claim 1, wherein the obtaining of the loading data of each display list item according to the number of the list items comprises:
and obtaining the loading data of each display list item according to the number of the list items and the identification of each display list item to be displayed.
3. The method according to claim 1, wherein after the generating of each display list item according to each display list item loading data, the displaying of each display list item in a row and the drawing of the sliding list are completed, the method further comprises:
when the sliding operation of a user on the sliding list is monitored, determining whether to add a new display list item to each display list item according to the sliding direction, the display area boundary position of the display area and the list area boundary position corresponding to each display list item;
if so, determining an additional list item identifier according to a display list item identifier of a last display list item in each display list item opposite to the sliding direction, and obtaining additional list item loading data according to the additional list item identifier;
and generating an additional list item according to the additional list item loading data, using the additional list item as the new display list item, and refreshing the sliding list after the new display list item is arranged and displayed at the last display list item.
4. The method according to claim 3, wherein after the generating of each display list item according to each display list item loading data, the displaying of each display list item in a row and the drawing of the sliding list are completed, the method further comprises:
when the sliding operation of a user on the sliding list is monitored, determining whether a list item to be removed exists in each display list item according to the sliding direction, the display area boundary position of the display area and the list area boundary position corresponding to each display list item;
and if the list items exist, removing the list items to be removed from each display list item, and storing the list items to be removed in a resource recycling pool.
5. The method of claim 4, wherein the determining whether to add a new display list item to each display list item according to the sliding direction, the display area boundary position of the display area, and the list area boundary position corresponding to each display list item comprises:
when the sliding direction is that the list area corresponding to the list item slides to the side with smaller coordinate value in the area boundary position, if the maximum coordinate value in the display area boundary position is smaller than the maximum coordinate value in the list area boundary position, determining to add a new display list item to each display list item;
when the sliding direction is that the list area slides to one side with larger coordinate values in the boundary position of the area, if the minimum coordinate value in the boundary position of the display area is larger than the minimum coordinate value in the boundary position of the list area, determining to add a new display list item to each display list item;
and/or determining whether a list item to be removed exists in each display list item according to the sliding direction, the display area boundary position of the display area and the list area boundary position corresponding to each display list item comprises:
when the sliding direction is that a list area corresponding to the list item slides to one side with a smaller coordinate value in the area boundary position, if the sum of the minimum coordinate value in the list area boundary position and a preset threshold value is larger than the minimum coordinate value in the display area boundary position, determining that the list item to be removed exists in each display list item;
when the sliding direction is that the list area slides to one side with larger coordinate values in the area boundary position, if the difference between the maximum coordinate value in the list area boundary position and the preset threshold value is larger than the maximum coordinate value in the display area boundary position, determining that a list item to be removed exists in each display list item.
6. The method according to claim 1, wherein after the generating of each display list item according to each display list item loading data, the displaying of each display list item in a row and the drawing of the sliding list are completed, the method further comprises:
and setting the corresponding boundary position of the list area corresponding to each display list item according to the size of the list item and the boundary position of the display area.
7. The method of claim 1, wherein said displaying the display list items in an arrangement comprises:
displaying a first display list item arranged at a preset position of the display area in a first display size and a first display transparency;
and determining a second display size and a second display transparency of each other display list item according to the distance between each other display list item except the first display list item in each display list item and the first display list item, the first display size and the first display transparency in other positions except the preset position in the display area, and displaying corresponding other display list items according to each second display size and each second display transparency.
8. A apparatus for processing a sliding list in Unity, comprising:
the list item number determining module is used for determining the number of list items to be displayed according to the size of the display area and the size of the list items in the Unity sliding list;
the display list item loading data acquisition module is used for acquiring the loading data of each display list item according to the number of the list items;
and the sliding list drawing module is used for generating each display list item according to the display list item loading data, and displaying each display list item in a row to finish drawing of the sliding list.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of processing a sliding list in Unity as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method of processing a sliding list in Unity as claimed in any one of claims 1 to 7.
CN202010064429.2A 2020-01-20 2020-01-20 Processing method, device, equipment and storage medium of sliding list in Unity Pending CN111309215A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010064429.2A CN111309215A (en) 2020-01-20 2020-01-20 Processing method, device, equipment and storage medium of sliding list in Unity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010064429.2A CN111309215A (en) 2020-01-20 2020-01-20 Processing method, device, equipment and storage medium of sliding list in Unity

Publications (1)

Publication Number Publication Date
CN111309215A true CN111309215A (en) 2020-06-19

Family

ID=71156350

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010064429.2A Pending CN111309215A (en) 2020-01-20 2020-01-20 Processing method, device, equipment and storage medium of sliding list in Unity

Country Status (1)

Country Link
CN (1) CN111309215A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112817672A (en) * 2021-01-06 2021-05-18 北京元年科技股份有限公司 Data presentation method and corresponding apparatus, computer device and medium
CN113568539A (en) * 2021-07-29 2021-10-29 曙光信息产业(北京)有限公司 List display method, device, equipment and storage medium
CN113641432A (en) * 2021-08-10 2021-11-12 中国平安人寿保险股份有限公司 Data display method, device, equipment and medium
CN113867590A (en) * 2021-09-29 2021-12-31 五八同城信息技术有限公司 Information processing method and device for list items, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103440093A (en) * 2013-09-10 2013-12-11 北京网秦天下科技有限公司 Method for displaying list in list display interface and mobile terminal
US8935620B1 (en) * 2008-03-20 2015-01-13 Amazon Technologies, Inc. Dynamic content management
CN108549515A (en) * 2018-03-27 2018-09-18 北京云知声信息技术有限公司 list display method and system
CN110568978A (en) * 2019-07-30 2019-12-13 惠州市德赛西威智能交通技术研究院有限公司 Dynamic loading method and device for list display data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8935620B1 (en) * 2008-03-20 2015-01-13 Amazon Technologies, Inc. Dynamic content management
CN103440093A (en) * 2013-09-10 2013-12-11 北京网秦天下科技有限公司 Method for displaying list in list display interface and mobile terminal
CN108549515A (en) * 2018-03-27 2018-09-18 北京云知声信息技术有限公司 list display method and system
CN110568978A (en) * 2019-07-30 2019-12-13 惠州市德赛西威智能交通技术研究院有限公司 Dynamic loading method and device for list display data

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112817672A (en) * 2021-01-06 2021-05-18 北京元年科技股份有限公司 Data presentation method and corresponding apparatus, computer device and medium
CN113568539A (en) * 2021-07-29 2021-10-29 曙光信息产业(北京)有限公司 List display method, device, equipment and storage medium
CN113641432A (en) * 2021-08-10 2021-11-12 中国平安人寿保险股份有限公司 Data display method, device, equipment and medium
CN113867590A (en) * 2021-09-29 2021-12-31 五八同城信息技术有限公司 Information processing method and device for list items, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111309215A (en) Processing method, device, equipment and storage medium of sliding list in Unity
JP6254534B2 (en) System and method for identifying and proposing emoticons and computer program
CN110020411B (en) Image-text content generation method and equipment
CN107704512B (en) Financial product recommendation method based on social data, electronic device and medium
CN110083688A (en) Search result recalls method, apparatus, server and storage medium
US20170177587A1 (en) Hierarchical entity information for search
US20160092428A1 (en) Dynamic Presentation of Suggested Content
US20160092419A1 (en) Structured Sample Authoring Content
US20140075393A1 (en) Gesture-Based Search Queries
US20110197165A1 (en) Methods and apparatus for organizing a collection of widgets on a mobile device display
EP3575988A1 (en) Method and device for retelling text, server, and storage medium
EP2930628A1 (en) Searching method, client and server
US10788980B2 (en) Apparatus and method for displaying application
JP2015517711A (en) Completing the application interface using search query keywords
US11714791B2 (en) Automated generation of revision summaries
US10255249B1 (en) Previewing electronic book content within third-party websites
CN104516635A (en) Content display management
US20190294645A1 (en) Systems and methods for optimizing the selection and display of electronic content
JP2018503917A (en) Method and apparatus for text search based on keywords
CN109672706B (en) Information recommendation method and device, server and storage medium
JP2019537785A (en) Information displayed while information scrolls on the terminal screen
CN114546383A (en) Driving scene display method and device, electronic equipment and storage medium
CN103116597A (en) Image-based information access device and method
CN112966513A (en) Method and apparatus for entity linking
CN113779449A (en) Page loading method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination