GMS 2 [SOLVED]Mouse hover window

Discussion in 'Programming' started by DevourerOC, Jun 6, 2018.

  1. DevourerOC

    DevourerOC Member

    Joined:
    Jun 1, 2018
    Posts:
    29
    How can I make discription window of object on mouse hover like that?
    [​IMG]

    SOLVED
     
    Last edited by a moderator: Jun 6, 2018
  2. Jdown79

    Jdown79 Member

    Joined:
    Aug 21, 2016
    Posts:
    69
    Mind posting your solution? Could be a valuable resource for others
     
    ½ a cup likes this.
  3. DevourerOC

    DevourerOC Member

    Joined:
    Jun 1, 2018
    Posts:
    29
    Create "Mouse enter" event for object on mouse hover
    Code:
    alarm[0] = delay
    and "mouse leave"
    Code:
    alarm[0] = -1;
    instance_destroy(objItemDiscription);
    alarm[0]:
    Code:
    instance_create_depth(x, y, depth -1, objItemDiscription);
    delay is delay before creation discription

    objItemDiscription is rectangle
    create event:
    Code:
    textBorder = 5;
    x = mouse_x + sprite_xoffset + 3*textBorder;
    y = mouse_y + sprite_yoffset;
    draw event:
    Code:
    draw_self();
    draw_text_ext(bbox_left + textBorder, bbox_top + textBorder, "discription", 15, sprite_width - textBorder);
    
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice