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
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.
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()
Background < TouchMove
image-source: /touch_move/img_touch_move/background
enterGame:addAnchor(AnchorRight, 'parent', AnchorRight)
The transparency is not working because of
Add there image-color: #ffffff00 and for MainWindow too.Code:Background < TouchMove image-source: /touch_move/img_touch_move/background
For positioning you can try to add somewhere in entergame.lua
By default MainWindows are displayed on center, with that you should be able to set whatever position you want.Lua:enterGame:addAnchor(AnchorRight, 'parent', AnchorRight)
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
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?The transparency is not working because of
Add there image-color: #ffffff00 and for MainWindow too.Code:Background < TouchMove image-source: /touch_move/img_touch_move/background
For positioning you can try to add somewhere in entergame.lua
By default MainWindows are displayed on center, with that you should be able to set whatever position you want.Lua:enterGame:addAnchor(AnchorRight, 'parent', AnchorRight)
Thanks for explaining, but when I switch from miniwindow to panel, go on the right side and does not work, all buttons stop working.Then you need to switch from MiniWindow to Panel or you can add new MiniWindow inside styles witg removed buttons etc.
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.You need to add panel to interface and then load module to that panel. Similar to game_console and gameBottomPanel.