• 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!

how to remove buttons to minimize and close

soltoreats

New Member
Joined
May 18, 2016
Messages
27
Reaction score
0
how to remove these buttons from HealthInfo module ?


ALTii3y.png
 
You can simply add to miniwindows.otui other class called MiniWindowNoButton, and copy all the styling from MiniWindow except for buttons + you will have to make similar class to MiniWindowContents.
 
In 30-miniwindow.otui you have that:
Code:
MiniWindow < UIMiniWindow
  font: verdana-11px-antialised
  icon-rect: 4 4 16 16
  width: 192
  height: 200
  text-offset: 24 5
  text-align: topLeft
  image-source: /images/ui/miniwindow
  image-border: 4
  image-border-top: 23
  image-border-bottom: 4
  focusable: false
  &minimizedHeight: 24

  $on:
    image-border-bottom: 2

  UIWidget
    id: miniwindowTopBar
    anchors.top: parent.top
    anchors.right: parent.right
    anchors.left: parent.left
    margin-right: 3
    margin-left: 3
    margin-top: 3
    size: 258 18
    phantom: true

  UIButton
    id: closeButton
    anchors.top: parent.top
    anchors.right: parent.right
    margin-top: 5
    margin-right: 5
    size: 14 14
    image-source: /images/ui/miniwindow_buttons
    image-clip: 28 0 14 14

    $hover:
      image-clip: 28 14 14 14

    $pressed:
      image-clip: 28 28 14 14

  UIButton
    id: minimizeButton
    anchors.top: closeButton.top
    anchors.right: closeButton.left
    margin-right: 3
    size: 14 14
    image-source: /images/ui/miniwindow_buttons
    image-clip: 0 0 14 14

    $hover:
      image-clip: 0 14 14 14

    $pressed:
      image-clip: 0 28 14 14

    $on:
      image-clip: 14 0 14 14

    $on hover:
      image-clip: 14 14 14 14

    $on pressed:
      image-clip: 14 28 14 14

MiniWindowContents < ScrollablePanel
  id: contentsPanel
  anchors.fill: parent
  anchors.right: miniwindowScrollBar.left
  margin-left: 3
  margin-bottom: 3
  margin-top: 22
  margin-right: 1
  vertical-scrollbar: miniwindowScrollBar

You need to make new ones based on these, just remove unnecessary things.
 
I did the following to remove the buttons of minime and close however not got success


MiniWindowNoButton < UIMiniWindow
font: verdana-11px-antialised
icon-rect: 4 4 16 16
width: 192
height: 200
text-offset: 24 5
text-align: topLeft
image-source: /images/ui/miniwindow
image-border: 4
image-border-top: 23
image-border-bottom: 4
focusable: false
&minimizedHeight: 24

$on:
image-border-bottom: 2

UIWidget
id: miniwindowTopBar
anchors.top: parent.top
anchors.right: parent.right
anchors.left: parent.left
margin-right: 3
margin-left: 3
margin-top: 3
size: 258 18
phantom: true

VerticalScrollBar
id: miniwindowScrollBar
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
step: 14
margin-top: 22
margin-right: 3
margin-bottom: 3
pixels-scroll: true

$!on:
width: 0

ResizeBorder
id: bottomResizeBorder
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
height: 3
minimum: 48
margin-left: 3
margin-right: 3
background: #ffffff88

MiniWindowNoButtonContents < ScrollablePanel
id: contentsPanel
anchors.fill: parent
anchors.right: miniwindowScrollBar.left
margin-left: 3
margin-bottom: 3
margin-top: 22
margin-right: 1
vertical-scrollbar: miniwindowScrollBar

BorderlessGameWindow < UIWindow
focusable: false
margin: 2
 
Did you changed in module/otui file from MiniWindow to MiniWindowNoButtons ?
 
changed and still not rolled believe the way I edited the miniwindow.otui may be wrong I do not know .
 
Back
Top