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

Lock Windows

chupaescadatri

Banned User
Joined
Jul 5, 2014
Messages
338
Reaction score
49
How do I lock the window at a certain location? And I remove the bottom of the window, leaving only the functions I created
:eek::eek::eek::eek::eek::eek::eek:
 
Inside otui MainWindow you need to add:
image-color: #ffffff00 or alpha
To lock window on certain pos you need to add function to make it unmoveable.
But you will need to set anchors to set position (by default it will open it on topLeft corner).
Other way around is to add additional panels for those.
 
Inside otui MainWindow you need to add:
image-color: #ffffff00 or alpha
To lock window on certain pos you need to add function to make it unmoveable.
But you will need to set anchors to set position (by default it will open it on topLeft corner).
Other way around is to add additional panels for those.

This is the file otui, I already added the color in several points and none left only the visible buttons, it did not work, this is the original file:
Code:
TouchMove < UICheckBox

  margin-top: 2
  font: verdana-11px-monochrome
  phantom: false

  size: 57 57

  $!pressed:
    image-clip: 0 0 200 200

  $pressed:
    image-clip: 0 200 200 200

Background < TouchMove
  image-source: /touch_move/img_touch_move/background

ArrowUp < TouchMove
  image-source: /touch_move/img_touch_move/Arrow_N

ArrowDown < TouchMove
  image-source: /touch_move/img_touch_move/Arrow_S

ArrowRight < TouchMove
  image-source: /touch_move/img_touch_move/Arrow_E

ArrowLeft < TouchMove
  image-source: /touch_move/img_touch_move/Arrow_W

MiniWindow
  id: touchMoveWindow
  !text: tr('Move')
  height: 200
  icon: /touch_move/img_touch_move/moving_keys_icon
  @onClose: modules.touch_move.onMiniWindowClose()
  &save: true

  UIButton
    id: changeButton
    anchors.top: minimizeButton.top
    anchors.right: minimizeButton.left
    margin-right: 3
    size: 14 14
    image-source: /images/ui/miniwindow_buttons
    image-clip: 70 0 14 14
    @onMouseRelease: modules.touch_move.changeNormalToAdvanced()

    $hover:
      image-clip: 70 14 14 14

    $pressed:
      image-clip: 70 28 14 14

  MiniWindowContents
    Background
      id: background
      anchors.top: parent.top
      anchors.bottom: parent.bottom
      anchors.left: parent.left
      anchors.right: parent.right

    ArrowUp
      id: arrowup
      anchors.top: parent.top
      anchors.horizontalCenter: parent.horizontalCenter
      margin-top: 5
      @onMousePress: modules.touch_move.AutoTouchMove('N')
      @onMouseRelease: modules.touch_move.AutoTouchMoveEnd()

    ArrowDown
      id: arrowdown
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 5
      @onMousePress: modules.touch_move.AutoTouchMove('S')
      @onMouseRelease: modules.touch_move.AutoTouchMoveEnd()

    ArrowRight
      id: arrowright
      anchors.top: arrowup.top
      anchors.left: arrowup.right
      margin-top: 61
      margin-left: 5
      @onMousePress: modules.touch_move.AutoTouchMove('E')
      @onMouseRelease: modules.touch_move.AutoTouchMoveEnd()

    ArrowLeft
      id: arrowleft
      anchors.top: arrowup.top
      anchors.right: arrowup.left
      margin-top: 61
      margin-right: 5
      @onMousePress: modules.touch_move.AutoTouchMove('W')
      @onMouseRelease: modules.touch_move.AutoTouchMoveEnd()
And about creating anchors how do I do this? I did not find a tutorial on this to be a start for me to do.
Thank you
 
The transparency is not working because of
Code:
Background < TouchMove
  image-source: /touch_move/img_touch_move/background
Add there image-color: #ffffff00 and for MainWindow too.
For positioning you can try to add somewhere in entergame.lua
Lua:
enterGame:addAnchor(AnchorRight, 'parent', AnchorRight)
By default MainWindows are displayed on center, with that you should be able to set whatever position you want.
 
The transparency is not working because of
Code:
Background < TouchMove
  image-source: /touch_move/img_touch_move/background
Add there image-color: #ffffff00 and for MainWindow too.
For positioning you can try to add somewhere in entergame.lua
Lua:
enterGame:addAnchor(AnchorRight, 'parent', AnchorRight)
By default MainWindows are displayed on center, with that you should be able to set whatever position you want.
Code:
Background < TouchMove
  image-color: #ffffff00


MiniWindow
  id: touchMoveWindow
  !text: tr('Move')
  height: 200
  image-color: #ffffff00
  icon: /touch_move/img_touch_move/moving_keys_icon
  @onClose: modules.touch_move.onMiniWindowClose()
  &save: true
dont work :(
The miniwindow does not open

Anchors do not entergame makes the entergame go away, but let's keep trying
 
The transparency is not working because of
Code:
Background < TouchMove
  image-source: /touch_move/img_touch_move/background
Add there image-color: #ffffff00 and for MainWindow too.
For positioning you can try to add somewhere in entergame.lua
Lua:
enterGame:addAnchor(AnchorRight, 'parent', AnchorRight)
By default MainWindows are displayed on center, with that you should be able to set whatever position you want.
I managed to remove the background thanks, I discovered the error, is that the module has an advanced function, I was applying in the basic part, now the doubt is, the background left but continues with the title above and the button close the X like me I leave clean without the close button?
 
Then you need to switch from MiniWindow to Panel or you can add new MiniWindow inside styles witg removed buttons etc.
 
Then you need to switch from MiniWindow to Panel or you can add new MiniWindow inside styles witg removed buttons etc.
Thanks for explaining, but when I switch from miniwindow to panel, go on the right side and does not work, all buttons stop working.
 
You need to add panel to interface and then load module to that panel. Similar to game_console and gameBottomPanel.
 
You need to add panel to interface and then load module to that panel. Similar to game_console and gameBottomPanel.
This part I did not quite understand, should I link my module to the gameinterface.lua file? Because I have another module that I downloaded it is without buttons and I did not need to link, but even looking at his code I playing in what I'm playing it loses its functions and stays fixed.
 
Back
Top