• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Changing background image

Nitned

New Member
Joined
Sep 5, 2012
Messages
6
Reaction score
0
Hello everyone, i wonder how i can change the background image of a button by placing the mouse on it, if possible using only Otui.

Example:
My default button is White:

23kvn0n.png


But i want to change this for Oranje if i place the mouse on it:
2wc16ih.png

It is possible?
How can I do this?

If it is necessary for me to post the codes, I will post.
 
Hello everyone, i wonder how i can change the background image of a button by placing the mouse on it, if possible using only Otui.

Example:
My default button is White:

23kvn0n.png


But i want to change this for Oranje if i place the mouse on it:
2wc16ih.png

It is possible?
How can I do this?

If it is necessary for me to post the codes, I will post.

It is possible? (Yes)

How you can do it?

background-color: #1f1f1f !important; (change -> #1f1f1f <- to the CODE-COLOUR you want it).
 
It is possible? (Yes)

How you can do it?

background-color: #1f1f1f !important; (change -> #1f1f1f <- to the CODE-COLOUR you want it).

Thanks man, but i'm using an "icon" to this button, all orange/white Button is an Image, i can use this code for image?
Code:

CSS:
Panel
  id: menuWindow
  !text: tr("")
  font: terminus-14px-bold
  text-align: center, top
  color: black
  anchors.left: parent.left
  anchors.top: parent.top
  anchors.right: parent.left
  anchors.bottom: parent.top
  margin-left: 32
  margin-top: 0
  margin-right: -190
  margin-bottom: -240
  width: 190
  height: 240
  @onEnter: mods.client_menu.hide()
  @onEscape: mods.client_menu.hide()

  Button
    id: firstButton
    size: 190 40
    anchors.left: parent.left
    anchors.top: parent.top
    icon: /images/game/menu/whiteButton.png
 
Thanks man, but i'm using an "icon" to this button, all orange/white Button is an Image, i can use this code for image?
Code:

CSS:
Panel
  id: menuWindow
  !text: tr("")
  font: terminus-14px-bold
  text-align: center, top
  color: black
  anchors.left: parent.left
  anchors.top: parent.top
  anchors.right: parent.left
  anchors.bottom: parent.top
  margin-left: 32
  margin-top: 0
  margin-right: -190
  margin-bottom: -240
  width: 190
  height: 240
  @onEnter: mods.client_menu.hide()
  @onEscape: mods.client_menu.hide()

  Button
    id: firstButton
    size: 190 40
    anchors.left: parent.left
    anchors.top: parent.top
    icon: /images/game/menu/whiteButton.png

Ey, could you give me IP to your server? I wanna check out the problem, it'd be much easier for me then to fix the problem.
 
Ey, could you give me IP to your server? I wanna check out the problem, it'd be much easier for me then to fix the problem.
This server is not currently online, it is still in development.
Are you missing any more information?
Anything i can give you.
 
Code:
$hover !disabled:
    background-color: orange
 
Code:
$hover !disabled:
    background-color: orange
Thanks, this works.
But in my case is:
Code:
  Button
    id: firstButton
    size: 190 40
    anchors.left: parent.left
    anchors.top: parent.top
    icon: /images/game/menu/buttonWhite
    $hover !disabled:
      icon: /images/game/menu/buttonOrange
 
Back
Top