Change active/inactive image of an interface button

  • #1, by LebosteinWednesday, 29. July 2015, 20:05 5 years ago
    My coin interface has 3 image buttons:

    1. an eye for look
    2. a hand for use/pick up
    3. a mouth for talk to

    Now I want to use the mouth button for more than talk. For some objects the mouth icon should change to a nose or ear icon. I don't need a new command, the only thing I need is to change the active/inactive image of the mouth button. I have experimented with action areas for every icon, turned on/off by conditions. But the action area collides with the area
    of the command button (only the upper layer triggers actions). Or is this a task for command groups or something? I have one button/command and three different "outfits" for that button/command.

    Key Killer

    601 Posts


  • #2, by denis-the-menphisWednesday, 29. July 2015, 21:24 5 years ago
    I'm not sure...but if you try to assign also a value at your object?
    For example...if value = 1 then ...change icon to..."nose" else...use "mouth"

    it's only an idea...grin

    Newbie

    73 Posts

  • #3, by LebosteinWednesday, 29. July 2015, 21:29 5 years ago
    the problem is, how I manage different images inside the interface editor. For every image a single button? But I need only one command for these buttons...

    Key Killer

    601 Posts

  • #4, by denis-the-menphisWednesday, 29. July 2015, 21:39 5 years ago
    try to use a secondary interface when you interact with the object? may be a solution?

    Newbie

    73 Posts

  • #5, by sebastianWednesday, 29. July 2015, 22:17 5 years ago
    you couuuuld try this:
    defining action areas with active/inactive images for the different variations of an action (talk, eat, lick, scream, etc).
    Only use the images for inactive/active for these action areas (since these are action areas they dont count as buttons/commands). Dont draw the borders.

    each of these areas have a condition so only one set of them will be shown.
    The right condition will be set when entering the object area. All other conditions turn to false.

    Finally place a "real" button on top of them which has the "use" command in it and a mouse enter/leave action which (de)activates ALL images of all action areas when entering/leaving the button.
    Because only one action area image is currently shown (defined by the condition) it changes all inactive to active images and the other way around.

    So you let one button control a lot images and defined by a condition only one set of them is visible...

    Thread Captain

    2337 Posts

  • #6, by LebosteinThursday, 30. July 2015, 09:00 5 years ago
    Finally place a "real" button on top of them which has the "use" command in it and a mouse enter/leave action which (de)activates ALL images of all action areas when entering/leaving the button.
    Because only one action area image is currently shown (defined by the condition) it changes all inactive to active images and the other way around.

    Ha! That was exactly my first idea. But the "real" button on top (with his own action area) hides (and block) the other (condition managed) action areas for the images! This don't work.

    Key Killer

    601 Posts

  • #7, by sebastianThursday, 30. July 2015, 12:18 5 years ago
    you dont need to draw action areas fot the action areas (lol) just use inactive/active image for them. nothing else. The "real" button is configured the other way around: no images but a defined area.

    Thread Captain

    2337 Posts

  • #8, by LebosteinWednesday, 05. August 2015, 13:14 5 years ago
    you dont need to draw action areas fot the action areas (lol) just use inactive/active image for them. nothing else. The "real" button is configured the other way around: no images but a defined area.

    Thats it! Thanks. grin

    Now I set the active images of all 3 "action area buttons", if I enter the action area of the "real button" and I set the inactive images of all 3 "action area buttons", if I leave the action area of the "real button". And only 1 of the 3 "action area buttons" is visible at the same time (conditions).

    And the conditions are set automaticaly by object name. If the object name ends with "_N" then you see the nose in the interface. If the object name ends with "_E" then you see an ear in the interface. Otherwise the mouth is active.

    Key Killer

    601 Posts

Write post