A self-adaptive UI adaptation method and system
An adaptive and parametric technology, applied in the field of games, can solve the problems of complex development logic and no unified standard scheme, and achieve the effect of simplifying the development process
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0055] like figure 1 Shown is an adaptive UI adaptation method, wherein the method includes the following steps:
[0056] Step S101: When the game is started and initialized for the first time, the corresponding safe area will be obtained according to the API defined by the system, and the ratio of the corresponding safe area to the border area will be calculated according to the actually obtained screen resolution and safe area (the obtained result is rectInPercent );
[0057] Step S102: During startup and initialization, a default startup page is added to automatically fill the screen for all UI parent nodes. According to the interface size, the actual screen resolution (screenRect) is obtained, and according to the safe area obtained in the first step Boundary ratio, calculate the safe area size and offset position;
[0058] An example is as follows: with the center point as the anchor point (0,0), the offset is calculated as follows:
[0059] offsetX=rectInPercent.x*scr...
Embodiment 2
[0067] like figure 2 As shown, the present invention also provides an embodiment, comprising the steps of:
[0068] Step S201: Obtain the screen resolution and SafeArea parameters of the current device when the game is started and initialized for the first time;
[0069] Step S202: Calculate UI adaptation stretching parameters, UI adaptation position parameters, and background image stretching parameters according to the screen resolution and SafeArea parameters;
[0070] Step S203: According to the screen resolution of the current device and SafeArea parameters, as well as the screen occupancy rate of the current interface during design, compare it with the safe area in SafeArea, and if it exceeds, calculate the actual range and position that should be displayed according to the ratio;
[0071] Step S204: When the UI is opened, stretch the background image of the currently opened UI with reference to the background image stretching parameters;
[0072] Step S205: When the ...
Embodiment 3
[0085] like Figure 4 As shown, the present invention also provides an adaptive UI adaptation system applying the above method, which includes: an acquisition unit 11, an operation unit 12, a background image adaptation execution unit 13, and a UI control adaptation execution unit 14;
[0086] The obtaining unit 11 is configured to obtain the screen resolution and SafeArea parameter of the current device; the obtaining unit 11 transmits the obtained screen resolution and SafeArea parameter of the current device to the computing unit 12 .
[0087] The computing unit 12 is configured to calculate the stretching parameters of the UI adaptation, the position parameters of the UI adaptation and the stretching parameters of the background image according to the screen resolution and the SafeArea parameter; the computing unit 12 calculates the stretching parameters of the UI adaptation, the UI adaptation The configured position parameters and background image stretching parameters ar...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com