Skip to content

New addon: Tab#1673

Merged
z16 merged 6 commits into
Windower:devfrom
from20020516:dev-Tab
Jun 13, 2018
Merged

New addon: Tab#1673
z16 merged 6 commits into
Windower:devfrom
from20020516:dev-Tab

Conversation

@from20020516
Copy link
Copy Markdown
Contributor

Tab

English

  • Simple addon Replace Tab key input to <stnpc> or <stpc>. (X+Tab)
  • Tips: if you won't to include pet or trust in <stnpc> by other players, use /ignorepet on and /ignoretrust on (in-game commands)

日本語

  • Tabキーの動作を<stnpc>または<stpc>(X+Tab)に置き換えます。
  • Tips: <stnpc>に他プレイヤーのペットやフェイスを含めたくない場合、/ignorepet on または /ignorefaith on(ゲーム内コマンド)をご利用ください。

Copy link
Copy Markdown
Member

@z16 z16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mentioned a few minor things as well as a problem on my part which I'll fix later today. I'd like for both changes to go live at the same time.

Comment thread addons/Tab/tab.lua Outdated
key_flags={}

--replace input tab. validated in Japanese keyboard. please let me know if problems occur with the English keyboard.
windower.register_event('keyboard',function(dik,flags,blocked)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the right signature. It should be:

windower.register_event('keyboard',function(dik, pressed, flags, blocked)

Where pressed is true if the key was pressed down and false if the key was released. Which also works better with what you're doing than calling it flags.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

X key does not appear to be supported by flags. (I want to emulate the target filter of ffxiv)

Comment thread addons/Tab/tab.lua Outdated
--replace input tab. validated in Japanese keyboard. please let me know if problems occur with the English keyboard.
windower.register_event('keyboard',function(dik,flags,blocked)
key_flags[dik] = flags
if flags and not windower.chat.is_open(true) then
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is my fault, is_open should not require an argument, but currently it does... I'll fix it later to not require the argument, so feel free to adjust it in the pull request already.

Comment thread addons/Tab/tab.lua Outdated

--block error message.
windower.register_event('incoming text',function(original,modified,original_mode)
if original_mode == 123 and st then
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When do you get this error? And why block it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When there is no <stnpc> target in the field of view of the player.
It was simply annoying for me :P

Comment thread addons/Tab/tab.lua Outdated
_addon.author = 'from20020516'
_addon.version = '1.0'

key_flags={}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would define the st variable here and default it to false.

@from20020516
Copy link
Copy Markdown
Contributor Author

changes done. thank you :)

@z16 z16 merged commit 4ee5927 into Windower:dev Jun 13, 2018
z16 added a commit that referenced this pull request Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants