CN103513974A - Method and device for achieving dynamic icon button - Google Patents
Method and device for achieving dynamic icon button Download PDFInfo
- Publication number
- CN103513974A CN103513974A CN201210215315.9A CN201210215315A CN103513974A CN 103513974 A CN103513974 A CN 103513974A CN 201210215315 A CN201210215315 A CN 201210215315A CN 103513974 A CN103513974 A CN 103513974A
- Authority
- CN
- China
- Prior art keywords
- picture
- button
- frame
- current active
- active frame
- 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
Links
Images
Abstract
The invention discloses a method and device for achieving a dynamic icon button. The method comprises the steps of configurating an image containing multi-frame pictures on a button on a user interface, and setting an owner-drawing control; when the owner-drawing control detects that a mouse moves into the event of the button, playing the multi-frame pictures on the button according to a first set sequence; when the owner-drawing control detects that the mouse moves out of the event of the button, playing the multi-frame pictures on the button according to a second set sequence. According to the technical scheme, the problem that a dynamic icon can not be displayed on the button on an existing application software user interface is solved, the attractiveness of the button is improved, and therefore the user experience degree is improved.
Description
Technical field
The present invention relates to software development technique field, particularly a kind of implementation method of dynamic icon and device.
Background technology
Along with improving constantly of computer hardware performance, driven the innovation of various user interfaces (UI, User Interface) technology.Aspect user interactions UI, various pleasing UI emerge in an endless stream especially, make user aspect software application experience, obtain improvement greatly.Mutual by this close friend, has not only improved the quality of software, has more improved user's loyalty.Well imagine, in future, UI still can, as the most important thing of software development, produce directly impact to the quality of a software.
Button in legacy user interfaces generally only contains display text and with the information of static icon, for example as shown in Figure 1, Fig. 1 is the schematic diagram of the Format Painter button in existing application software.Although the implication of the expression button that these buttons in existing user interface can be definite, is not very attractive in appearance, user experience is not high.
Summary of the invention
The invention provides a kind of implementation method and device of dynamic icon, with the button solving in existing application software user interface, can not show dynamic icon, aesthetics is not high, the problem that user experience is not high.
In order to achieve the above object, technical scheme of the present invention is achieved in that
The invention discloses a kind of implementation method of dynamic icon, the picture that comprises multiframe picture for the button arrangement in user interface, and arrange from painting control, the method comprises:
When certainly painting control and mouse detected and move into the event of described button, by the first setting order, on described button, play described multiframe picture;
When certainly painting control and mouse detected and shift out the event of described button, by the second setting order, on described button, play described multiframe picture.
In said method, by the first/bis-setting order, on described button, play described multiframe picture and comprise:
A, the first frame arranging in the first/bis-setting order are current active frame;
B, play current active frame, obtain the reproduction time of current active frame, allow the picture of the current active frame reproduction time described in stopping on described button;
C, judging that whether current active frame is the first/bis-to set the last frame in order, is stop or jumping to steps A, otherwise next frame is set is current active frame and jump to step B.
The method further comprises: the reproduction time of each frame of pre-configured described multiframe picture;
In said method, described in obtain current active frame reproduction time comprise: the pre-configured reproduction time that obtains current active frame.
In said method, the described picture that comprises multiframe picture for button arrangement comprises:
For a plurality of pictures of button arrangement, each picture in the plurality of picture comprises a frame picture;
Or, a picture that comprises multiframe picture for button arrangement.
In said method, the described picture that comprises multiframe picture for button arrangement comprises: be the dynamic GIF picture of button arrangement;
Describedly on described button, play described multiframe picture and comprise: certainly paint control and utilize GDI+ to resolve described dynamic GIF picture, and play described dynamic GIF picture at the assigned address of described button.
In said method, described the second setting order is to set with described first the order that order is contrary.
The method further comprises: when mouse is not chosen described button, from painting control, show the assigned picture in described multiframe picture on button.
The invention also discloses a kind of implement device of dynamic icon, this device comprises: memory module and certainly paint module;
Described memory module, for saving as the picture that comprises multiframe picture of the button arrangement in user interface;
Described from painting module, for when mouse being detected and move into the event of described button, the described multiframe picture of preserving in playing memory module by the first setting order on described button; For when mouse being detected and shift out the event of described button, by the second setting order, on described button, play the described multiframe picture in memory module.
In said apparatus, described from painting module, for performing step A: it is current active frame that the first/bis-the first frame of setting order is set; Then from painting module execution step B: play current active frame, obtain the reproduction time of current active frame, allow the picture of current active frame stop described reproduction time on described button; From painting module, perform step again C: judging that whether current active frame is the first/bis-to set the last frame in order, is to stop or jumping to steps A carrying out, otherwise next frame is set is current active frame and jump to step B and carry out.
In said apparatus, described memory module, for saving as the dynamic GIF picture of button arrangement;
Described from painting module, for utilizing GDI+ to resolve described dynamic GIF picture, and play described dynamic GIF picture at the assigned address of described button.
The present invention is this is the picture that the button arrangement in user interface comprises multiframe picture, and arrange from painting control, when certainly painting control and mouse detected and move into the event of described button, by the first setting order, on described button, play described multiframe picture, when certainly painting control and mouse detected and shift out the event of described button, by the second setting order, on described button, play the technical scheme of described multiframe picture, the button having solved in existing application software user interface can not show dynamic icon, aesthetics is not high, the problem that user experience is not high.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of the Format Painter button in existing application software;
Fig. 2 is the process flow diagram of the implementation method of a kind of dynamic icon in the present invention;
Fig. 3 sets order by the first/bis-in the present invention on described button, to play the process flow diagram of described multiframe picture;
Fig. 4 is the structural drawing of the implement device of a kind of dynamic icon in the embodiment of the present invention.
Embodiment
The solution of the present invention is based oneself upon and in Windows operating system, is made the button that a following user experiences: on the basis of traditional button, on button, add a dynamic icon, when mouse is moved in this button, by the first setting order, start playing animation, playing sequence can be from the first frame, to be played to last frame just to stop playing.When mouse shifts out this button, by the second setting order, start playing animation, playing sequence is to be played to the first frame from last frame, finally stops playing.
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Fig. 2 is the process flow diagram of the implementation method of a kind of dynamic icon in the present invention.As shown in Figure 2, the method comprises:
201, the picture that comprises multiframe picture for the button arrangement in user interface, and arrange from painting control.
In this step, be a plurality of pictures of button arrangement, each picture in the plurality of picture comprises a frame picture; For example, or be the picture that button arrangement comprises multiframe picture, this picture is divided into 4, every is all a picture, and this picture comprises 4 frame pictures.The form of picture can be BMP, JPG, PNG etc.
202, when certainly painting control and mouse detected and move into the event of described button, by the first setting order, on described button, play described multiframe picture.
203, when certainly painting control and mouse detected and shift out the event of described button, by the second setting order, on described button, play described multiframe picture.
Shown in Fig. 2, in method, adopt from painting control and carry out the drafting of button Dynamic Graph target, be not subject to the limitation of the conventional button form of expression, conventional button is generally rectangle, and the control of certainly painting in the present invention adopts without window technique, can realize the various beautiful outward appearances of dazzling, as put dynamic icon etc. on out-of-shape, button.
Fig. 3 sets order by the first/bis-in the present invention on described button, to play the process flow diagram of described multiframe picture.As shown in Figure 3, comprising:
301, it is current active frame that the first/bis-the first frame of setting in order is set.
302, play current active frame, obtain the reproduction time of current active frame, allow the picture of current active frame on described button, stop described reproduction time.
In the present invention, the reproduction time of each frame of pre-configured described multiframe picture, obtains the pre-configured reproduction time of current active frame in this step.The reproduction time of each frame of pre-configured described multiframe picture specifically can make to configure corresponding thread or timer.
303, judge that whether current active frame is the first/bis-to set the last frame in order, be stop or jumping to step 301, otherwise next frame is set is current active frame and jump to step 302.
In this step, when being played to last frame, stop playing or jumping to step 301 from newly starting loop play.
In a preferred embodiment of the present invention, the picture that comprises multiframe picture for button arrangement described in step 201 is: be button arrangement dynamic image interchange format (GIF, Graphics Interchange Format) picture.Described in step 202 and 203, on described button, playing described multiframe picture comprises: certainly paint control and utilize Graphics Device Interface GDI+ to resolve described dynamic GIF picture, and play described dynamic GIF picture at the assigned address of described button.Playing each Zheng interval can control with thread or timer.
In a preferred embodiment of the present invention, described the second setting order is to set with described first the order that order is contrary.When mouse is moved in this button, playing order is to be played to last frame from the first frame, and when mouse shifts out this button, playing order is from last frame to the first frame, to reach a kind of visual impact of feature.When mouse is not chosen described button, from painting control, on button, show the assigned picture in described multiframe picture, as show the picture of the first frame.
Fig. 4 is the structural drawing of the implement device of a kind of dynamic icon in the embodiment of the present invention.As shown in Figure 4, this device comprises: memory module 401 and certainly paint module 402;
From painting module 402, for when mouse being detected and move into the event of described button, by the first setting order, on described button, play the described multiframe picture of preserving in memory module 401; For when mouse being detected and shift out the event of described button, by the second setting order, on described button, play the described multiframe picture in memory module 401.
Described from painting module 402, for performing step A: it is current active frame that the first/bis-the first frame of setting order is set; Then from painting module execution step B: play current active frame, obtain the reproduction time of current active frame, allow the picture of current active frame stop described reproduction time on described button; From painting module, perform step again C: judging that whether current active frame is the first/bis-to set the last frame in order, is to stop or jumping to steps A carrying out, otherwise next frame is set is current active frame and jump to step B and carry out.
Described memory module 401, for saving as the dynamic GIF picture of button arrangement;
Described from painting module 402, for utilizing GDI+ to resolve described dynamic GIF picture, and play described dynamic GIF picture at the assigned address of described button.
In sum, the present invention is this is the picture that the button arrangement in user interface comprises multiframe picture, and arrange from painting control, when certainly painting control and mouse detected and move into the event of described button, by the first setting order, on described button, play described multiframe picture, when certainly painting control and mouse detected and shift out the event of described button, by the second setting order, on described button, play the technical scheme of described multiframe picture, the button having solved in existing application software user interface can not show dynamic icon, aesthetics is not high, the problem that user experience is not high, make can show animation on the button of user interface, improved the aesthetics of button, improved user's experience.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.All any modifications of doing within the spirit and principles in the present invention, be equal to replacement, improvement etc., be all included in protection scope of the present invention.
Claims (10)
1. an implementation method for dynamic icon, is characterized in that, the picture that comprises multiframe picture for the button arrangement in user interface, and arrange from painting control, the method comprises:
When certainly painting control and mouse detected and move into the event of described button, by the first setting order, on described button, play described multiframe picture;
When certainly painting control and mouse detected and shift out the event of described button, by the second setting order, on described button, play described multiframe picture.
2. method according to claim 1, is characterized in that, plays described multiframe picture comprise by the first/bis-setting order on described button:
A, the first frame arranging in the first/bis-setting order are current active frame;
B, play current active frame, obtain the reproduction time of current active frame, allow the picture of the current active frame reproduction time described in stopping on described button;
C, judging that whether current active frame is the first/bis-to set the last frame in order, is stop or jumping to steps A, otherwise next frame is set is current active frame and jump to step B.
3. method according to claim 2, is characterized in that, the method further comprises: the reproduction time of each frame of pre-configured described multiframe picture;
The reproduction time that obtains current active frame comprises: the pre-configured reproduction time that obtains current active frame.
4. method according to claim 1, is characterized in that, the described picture that comprises multiframe picture for button arrangement comprises:
For a plurality of pictures of button arrangement, each picture in the plurality of picture comprises a frame picture;
Or, a picture that comprises multiframe picture for button arrangement.
5. method according to claim 1, is characterized in that,
The described picture that comprises multiframe picture for button arrangement comprises: be the dynamic GIF picture of button arrangement;
Describedly on described button, play described multiframe picture and comprise: certainly paint control and utilize GDI+ to resolve described dynamic GIF picture, and play described dynamic GIF picture at the assigned address of described button.
6. method according to claim 1, is characterized in that, described the second setting order is to set with described first the order that order is contrary.
7. according to the method described in any one in claim 1 to 6, it is characterized in that, the method further comprises: when mouse is not chosen described button, from painting control, show the assigned picture in described multiframe picture on button.
8. an implement device for dynamic icon, is characterized in that, this device comprises: memory module and certainly paint module;
Described memory module, for saving as the picture that comprises multiframe picture of the button arrangement in user interface;
Described from painting module, for when mouse being detected and move into the event of described button, the described multiframe picture of preserving in playing memory module by the first setting order on described button; For when mouse being detected and shift out the event of described button, by the second setting order, on described button, play the described multiframe picture in memory module.
9. device according to claim 8, is characterized in that,
Described from painting module, for performing step A: it is current active frame that the first/bis-the first frame of setting order is set; Then from painting module execution step B: play current active frame, obtain the reproduction time of current active frame, allow the picture of current active frame stop described reproduction time on described button; From painting module, perform step again C: judging that whether current active frame is the first/bis-to set the last frame in order, is to stop or jumping to steps A carrying out, otherwise next frame is set is current active frame and jump to step B and carry out.
10. device according to claim 8, is characterized in that,
Described memory module, for saving as the dynamic GIF picture of button arrangement;
Described from painting module, for utilizing GDI+ to resolve described dynamic GIF picture, and play described dynamic GIF picture at the assigned address of described button.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210215315.9A CN103513974A (en) | 2012-06-26 | 2012-06-26 | Method and device for achieving dynamic icon button |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210215315.9A CN103513974A (en) | 2012-06-26 | 2012-06-26 | Method and device for achieving dynamic icon button |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103513974A true CN103513974A (en) | 2014-01-15 |
Family
ID=49896764
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210215315.9A Pending CN103513974A (en) | 2012-06-26 | 2012-06-26 | Method and device for achieving dynamic icon button |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103513974A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106708511A (en) * | 2016-11-28 | 2017-05-24 | 上海传英信息技术有限公司 | Dynamic icon setting method and using method |
CN106984044A (en) * | 2017-03-03 | 2017-07-28 | 网易(杭州)网络有限公司 | Method and apparatus for starting default flow |
CN109254772A (en) * | 2018-09-06 | 2019-01-22 | 北京酷我科技有限公司 | A kind of generation method of the switch button of smiling face's pattern |
WO2019051686A1 (en) * | 2017-09-13 | 2019-03-21 | 深圳传音通讯有限公司 | Icon display method and icon display apparatus for smart terminal |
CN110244948A (en) * | 2019-04-24 | 2019-09-17 | 深圳点猫科技有限公司 | The method and electronic equipment that language switches over button state based on programming |
CN111669634A (en) * | 2020-02-28 | 2020-09-15 | 海信视像科技股份有限公司 | Video file preview method and display equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110145705A1 (en) * | 2009-12-15 | 2011-06-16 | Wen-Jiunn Cheng | Control method of user interface |
CN102200882A (en) * | 2010-03-24 | 2011-09-28 | Nec卡西欧移动通信株式会社 | Terminal device and control program thereof |
CN102509235A (en) * | 2011-10-31 | 2012-06-20 | 福州博远无线网络科技有限公司 | Purchase interactive method based on mobile video of intelligent handheld device |
-
2012
- 2012-06-26 CN CN201210215315.9A patent/CN103513974A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110145705A1 (en) * | 2009-12-15 | 2011-06-16 | Wen-Jiunn Cheng | Control method of user interface |
CN102200882A (en) * | 2010-03-24 | 2011-09-28 | Nec卡西欧移动通信株式会社 | Terminal device and control program thereof |
CN102509235A (en) * | 2011-10-31 | 2012-06-20 | 福州博远无线网络科技有限公司 | Purchase interactive method based on mobile video of intelligent handheld device |
Non-Patent Citations (3)
Title |
---|
万秋霞: "基于逻辑动漫平台的动画机制研究与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
郑琳川: "《利用ActionScript和电影剪辑模拟按钮效果》", 《中国西部科技》 * |
黄立靖: "基于VB的应用程序中多媒体技术实现的研究", 《长春师范学院学报(自然科学版)》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106708511A (en) * | 2016-11-28 | 2017-05-24 | 上海传英信息技术有限公司 | Dynamic icon setting method and using method |
CN106984044A (en) * | 2017-03-03 | 2017-07-28 | 网易(杭州)网络有限公司 | Method and apparatus for starting default flow |
CN106984044B (en) * | 2017-03-03 | 2020-09-01 | 网易(杭州)网络有限公司 | Method and equipment for starting preset process |
WO2019051686A1 (en) * | 2017-09-13 | 2019-03-21 | 深圳传音通讯有限公司 | Icon display method and icon display apparatus for smart terminal |
CN109254772A (en) * | 2018-09-06 | 2019-01-22 | 北京酷我科技有限公司 | A kind of generation method of the switch button of smiling face's pattern |
CN110244948A (en) * | 2019-04-24 | 2019-09-17 | 深圳点猫科技有限公司 | The method and electronic equipment that language switches over button state based on programming |
CN111669634A (en) * | 2020-02-28 | 2020-09-15 | 海信视像科技股份有限公司 | Video file preview method and display equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103513974A (en) | Method and device for achieving dynamic icon button | |
US9582610B2 (en) | Visual post builder | |
CN103077015B (en) | A kind of method of Dynamic controlling frame rate of game | |
US10592071B2 (en) | Multi-display system, electronic device, and content output method | |
US8771048B2 (en) | Computer-implemented video puzzles | |
CN104038620A (en) | Mobile phone video playing control system and method thereof | |
CN105103111A (en) | User interface for computing device | |
CN103546816A (en) | User interface processing and video playing method and user interface system | |
CN105797380B (en) | Method and system for realizing information interaction among group members in mobile terminal game | |
CN102662664A (en) | Interface animation realization method and system | |
JPWO2011158446A1 (en) | Animation control apparatus, animation control method, and animation control program | |
WO2012006907A1 (en) | Method and apparatus for implementing dynamic switch of mobile terminal interface | |
US20100085355A1 (en) | Image Generating Apparatus, Image Processing Method, Information Recording Medium, and Program | |
CN105898523B (en) | A kind of video broadcasting method and device | |
CN104980563A (en) | Operation demonstration method and operation demonstration device | |
CN107577661B (en) | Interactive output method and system for virtual robot | |
US20110285727A1 (en) | Animation transition engine | |
CN106569834A (en) | Animation production method and animation production system based on browser | |
CN105446593A (en) | Game dynamic icon control method and apparatus | |
US8912984B2 (en) | Method and device for overlapping display | |
CN103019766A (en) | Android equipment-based dynamic wallpaper arrangement method, android equipment-based dynamic wallpaper arrangement device and terminal | |
CN102012805A (en) | Custom cursor realization method and device | |
CN101976195B (en) | Method and device for setting user interface | |
US20090058863A1 (en) | Image animation with transitional images | |
CN109429091A (en) | Promote method, storage medium, electronic equipment and the system of live streaming viewing experience |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140115 |