Guest telsor Posted March 30, 2012 Share Posted March 30, 2012 Всем доброго времени суток. Подскажите пожалуйста, как сделать, чтобы моё окно было поверх всех остальных. Пишу <Priority>4000</Priority> однако окно чата всё равно перекрывает моё окно. Нужно реализовать чтобы щёлчок мыши выводил окно на передний план. Quote Link to comment Share on other sites More sharing options...
Guest telsor Posted March 30, 2012 Share Posted March 30, 2012 И ещё вопрос, как по id предмета или его имени получить его текстуру. Quote Link to comment Share on other sites More sharing options...
Setras Posted March 30, 2012 Share Posted March 30, 2012 <Priority>99991000500099999000066464518828437521824945125</Priority>. С чего ты взял что у окна чата Priority меньше 4000? /Allods Online/data/Mods/Docs/Modding Docs 120222/LuaApi/FunctionWidgetSetPriority.html /Allods Online/data/Mods/Docs/Modding Docs 120222/LuaApi/FunctionAvatarGetItemInfo.html icon: TextureId - текстура с иконкой предмета. Quote Link to comment Share on other sites More sharing options...
Guest telsor Posted March 30, 2012 Share Posted March 30, 2012 Большое спасибо) Появились ещё пара вопросов. Как узнать потерю фокуса виджета. Предположим моё окно частично перекрывает окно сумки, щёлкнув на сумку мне надо отловить потерю фокуса и снизить приоритет моего окна. Как это можно реализовать? И по поводу текстуры. Можно ли TextureId возвращаемое GetItemInfo передать SetForegroundTexture? Quote Link to comment Share on other sites More sharing options...
Setras Posted March 31, 2012 Share Posted March 31, 2012 Можно постоянно юзать IsFocused( self ), правда не знаю насколько эффективно можно реализовать это в глобальном плане... Может быть ведь еще куча других аддонов со своими окнами от других людей. Quote Link to comment Share on other sites More sharing options...
Guest telsor Posted March 31, 2012 Share Posted March 31, 2012 Спасибо. Почему-то не работает IsFocused. Пробовал писать mainForm:IsFocused() и mainPanel:IsFocused() . Всегда возвращает false. Может быть это не тот фокус о котором обычно думают?) Quote Link to comment Share on other sites More sharing options...
Setras Posted March 31, 2012 Share Posted March 31, 2012 А курсор держать в окне виджета к которому применял и который не является Transparent/Invisible пробовал? Quote Link to comment Share on other sites More sharing options...
Guest telsor Posted March 31, 2012 Share Posted March 31, 2012 Из виджетов я сделал только mainform и mainpanel. Оба не прозрачные, видимые. В скрипте создал таймер, каждую секунду идёт проверка, если mainPanel:IsFocused(), то вывод в логфайл тру и изменение приоритета на 10000, else запись в логфайл false и изменение приоритета на 0. В игре постоянно тыкаю мышкой на свою форму, но в логфайл ещё ни разу не записалось ничего кроме false. Так в чём же проблема? Quote Link to comment Share on other sites More sharing options...
Ciuine Posted March 31, 2012 Share Posted March 31, 2012 IsFocused() is used for EditLine/CommandLines. It's use is to check whether the EditLine is usable or not. SetFocus() demands that the EditLine be selected. Quote Link to comment Share on other sites More sharing options...
Setras Posted April 1, 2012 Share Posted April 1, 2012 Thank you very much! I din't know that. Quote Link to comment Share on other sites More sharing options...
Guest telsor Posted April 1, 2012 Share Posted April 1, 2012 Во. Спасибо ) Я ж говорил это не тот фокус). Но тогда с помощью чего это можно реализовать? Quote Link to comment Share on other sites More sharing options...
Setras Posted April 1, 2012 Share Posted April 1, 2012 Советую поковырять скрипты AddonTools. Quote Link to comment Share on other sites More sharing options...
Setras Posted April 1, 2012 Share Posted April 1, 2012 Там нечто подобное реализовано - когда курсор убираешь из окна - оно скрывается. ПРавда как реализовано - не знаю. Quote Link to comment Share on other sites More sharing options...
Setras Posted April 1, 2012 Share Posted April 1, 2012 Code: <?xml version="1.0" encoding="UTF-8" ?><WidgetPanel> <Name>dscPanelReact</Name> <BackLayer href=""/ > <FrontLayer href="" /> <Visible>false</Visible> <reactionDblClick>mouse_double_click</reactionDblClick> <IgnoreDblClick>false</IgnoreDblClick> <reactionOnPointing>panel_over</reactionOnPointing> <forceReactionOnPointing>true</forceReactionOnPointing></WidgetPanel> Нас интересует: <reactionOnPointing>panel_over</reactionOnPointing>Срабатывает когда на панель наводят курсор. Quote Link to comment Share on other sites More sharing options...
Guest telsor Posted April 2, 2012 Share Posted April 2, 2012 Спасибо, но это не совсем то что мне нужно. Можно ли как-то отлавливать события не относящиеся к моему виджету? Например перехватывать клики мыши и затем смотреть был ли щелчок на моём окне. В любом случае, спасибо, если не смогу сделать так как хотел, то наверное реализую то что вы предложили. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.