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

OTClient [OTCv8]Custom Module - Interface Focus Problem

potinho

Advanced OT User
Joined
Oct 11, 2009
Messages
1,403
Solutions
17
Reaction score
151
Location
Brazil
Hello guys, how are you?Few days ago some members of this community told me the problem im having is a interface focus problem on OTCv8. I have a custom module for my autoloot system, who players select monster and then their loot to add. The problem is, after open this module, client get some kinda of freeze (looks like its in second plan) i have to click in client again to be able to walk and do other things with player. Can u guys help me to fix this module?

Code:
LootListLabel < Label
  background-color: alpha
  text-offset: 2 0
  focusable: true
  height: 16

  $focus:
    background-color: #00000055

LootListLabelButtons < LootListLabel
  Button
    id: addOne
    !text: tr('v')
    anchors.right: parent.right
    margin-right: 15
    width: 15
    height: 15

  Button
    id: remove
    !text: tr('x')
    anchors.right: prev.left
    margin-right: 3
    width: 15
    height: 15


LootListWindow < MainWindow
  id: lootListWindow
  !text: tr('Loots')
  size: 450 350
  @onEscape: self:hide()

  ButtonBox
    id: rbMonster
    anchors.left: MonsterList.left
    anchors.top: parent.top
    margin-bottom: 3
    height: 17
    width: 60
    checked: false
    text: Monster

  ButtonBox
    id: rbPlayer
    anchors.right: MonsterList.right
    anchors.top: parent.top
    margin-left: 3
    margin-bottom: 3
    height: 17
    width: 60
    checked: false
    text: Player

  Label
    id: lblMonster
    anchors.left: MonsterList.left
    anchors.top: parent.top
    anchors.right: MonsterList.right
    text-align: center
    text: < List >
    margin-right: 3

  TextList
    id: MonsterList
    anchors.top: parent.top
    anchors.left: parent.left
    margin-top: 15
    margin-bottom: 5
    margin-right: 3
    padding: 1
    width: 180
    height: 200
    vertical-scrollbar: MonsterListScrollBar

  VerticalScrollBar
    id: MonsterListScrollBar
    anchors.top: MonsterList.top
    anchors.bottom: MonsterList.bottom
    anchors.right: MonsterList.right
    step: 14
    pixels-scroll: true

  TextEdit
    id: MonsterSearch
    anchors.right: ButtonMonsterSearch.left
    anchors.left: MonsterList.left
    anchors.top: MonsterList.bottom 
    margin-top: 5
    margin-right: 3

  Button
    id: ButtonMonsterSearch
    anchors.top: MonsterList.bottom
    anchors.right: ButtonMonsterSearchClear.left
    margin-top: 5
    width: 22
    height: 22
    text: v
    &onMousePress: modules.game_autolootz.updateCurrentMonsterList

  Button
    id: ButtonMonsterSearchClear
    anchors.top: MonsterList.bottom
    anchors.right: MonsterList.right
    margin-top: 5
    width: 22
    height: 22
    text: x
    &onMousePress: modules.game_autolootz.clearMonsterListText

  HorizontalSeparator
    id: sepMonster
    anchors.right: MonsterList.right
    anchors.left: MonsterList.left
    anchors.top: MonsterSearch.bottom
    margin-top: 10

  VerticalSeparator
    anchors.top: MonsterList.top
    anchors.bottom: alRemoveList.bottom
    anchors.left: ButtonMonsterSearchClear.right
    margin-left: 2

  Button
    id: alNewList
    anchors.top: sepMonster.bottom
    anchors.left: sepMonster.left
    margin-bottom: 3
    margin-top: 5
    height: 17
    width: 80
    text: New List
    &onMousePress: modules.game_autolootz.onAlNewListMousePress

  Button
    id: alRemoveList
    anchors.top: sepMonster.bottom
    anchors.right: sepMonster.right
    margin-bottom: 3
    margin-top: 5
    height: 17
    width: 80
    text: Remove List
    &onMousePress: modules.game_autolootz.onAlRemoveListMousePress

  Label
    anchors.right: LootList.right
    anchors.top: parent.top
    anchors.left: LootList.left
    text-align: center
    text: Loots
    margin-left: 3   

  TextList
    id: LootList
    anchors.top: parent.top
    anchors.left: MonsterList.right
    anchors.right: parent.right
    margin-top: 15
    margin-bottom: 5
    margin-left: 5
    padding: 1
    width: 220
    height: 200
    vertical-scrollbar: LootListScrollBar

  VerticalScrollBar
    id: LootListScrollBar
    anchors.top: LootList.top
    anchors.bottom: LootList.bottom
    anchors.right: LootList.right
    step: 14
    pixels-scroll: true

  TextEdit
    id: EditLootAdd
    anchors.right: ButtonLootAdd.left
    anchors.left: LootList.left
    anchors.top: LootList.bottom
    margin-right: 3 
    margin-top: 5

  Button
    id: ButtonLootAdd
    anchors.top: LootList.bottom
    anchors.right: LootList.right
    margin-top: 5
    width: 40
    height: 22
    text: Add ^
    &onMousePress: modules.game_autolootz.onAlEditAddMousePress
 
  HorizontalSeparator
    id: sepLoot
    anchors.right: LootList.right
    anchors.left: LootList.left
    anchors.top: EditLootAdd.bottom
    margin-top: 10

  Button
    id: alClear
    anchors.top: sepLoot.bottom
    anchors.left: sepLoot.left
    margin-top: 5
    margin-bottom: 3
    height: 17
    width: 60
    text: Clear
    &onMousePress: modules.game_autolootz.onAlClearMousePress

  Button
    id: alAdd
    anchors.top: sepLoot.bottom
    anchors.right: sepLoot.right
    margin-top: 5
    margin-bottom: 3
    height: 17
    width: 60
    text: Add
    &onMousePress: modules.game_autolootz.onAlAddMousePress
  
  HorizontalSeparator
    id: sepfull
    anchors.right: parent.right
    anchors.left: parent.left
    anchors.bottom: btnClose.top
    margin-bottom: 10

  Button
    id: btnClose
    anchors.bottom: parent.bottom
    anchors.right: parent.right
    margin-top: 3
    margin-bottom: 3
    height: 17
    width: 60
    text: Close
    @onEscape: self:hide()
    &onMousePress: modules.game_autolootz.openLootWindow

  Button
    id: btnUpdateMonster
    anchors.bottom: parent.bottom
    anchors.left: parent.left
    margin-top: 3
    margin-bottom: 3
    height: 17
    width: 100
    text: Update Monsters
    visible: false
    &onMousePress: modules.game_autolootz.toggleReadTextEditor
Code:
Module
  name: game_autolootz
  description: Autoloot UI
  author: Druidex
  reloadable: true
  sandboxed: true
  scripts: [ autolootz ]
  @onLoad: init()
  @onUnload: terminate()

And there's a LUA attached
 

Attachments

Last edited:
try
in
Code:
LootListWindow < MainWindow

add

Lua:
focusable: false
Sorry to up this, but i realize something, the "freezing" problem is gone, but now im not able to search monster in text box, the things its like a "greyed out":

1706990074572.png
 
When I helped you.
After I provided the solution to you.
Immediately you deleted the original post.
I don't help those kinds of people.


(After I reported you.
The original post returned.)

Don't tag me.
I talked to a moderator and he warned me, this module contains some paid stuffs but i didnt know were against rules, in more then 10 years here in this forum i did it just once, with thousands topics who maybe will help another people too. But i respect your wish, thanks anyway.
 
Last edited:
Back
Top