Created
May 28, 2017 11:29
-
-
Save Akkiesoft/3483a75179772de7d8d2790ca8bd327e to your computer and use it in GitHub Desktop.
あいちゃんの画像から骨を作るバージョンのmikutter_yometab. yysk_wp5.jpgを読み込んだ後設定画面でapplyを連打する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8 -*- | |
################################################################################ | |
## mikutter_yome | |
## https://github.com/Akkiesoft/yometab | |
## | |
Plugin.create :yometab do | |
@yometab_table = { | |
'yome' => '嫁', | |
'tsuma' => '妻', | |
'musume' => '娘', | |
'imouto' => '妹', | |
'kanojo' => '彼女', | |
'jis' => '〄' | |
} | |
def create_yometab() | |
yometab_name = UserConfig[:yometab_name] || "yome" | |
yome_url = UserConfig[:yometab_url] | |
yome_x = UserConfig[:yometab_x] || "100" | |
yome_y = UserConfig[:yometab_y] || "100" | |
tab(:mikutter_yometab, "#{@yometab_table[yometab_name]}タブ") do | |
icon = File.expand_path(File.join(File.dirname(__FILE__), "#{yometab_name}.png")) | |
set_icon icon | |
expand | |
if yome_url != nil then | |
picture = Gtk::WebIcon.new(yome_url, yome_x.to_i, yome_y.to_i) | |
nativewidget Gtk::HBox.new(false, 0).closeup(picture) | |
end | |
end | |
end | |
create_yometab() | |
settings "嫁タブ" do | |
fileselect '画像URL', :yometab_url | |
input '画像Xサイズ', :yometab_x | |
input '画像Yサイズ', :yometab_y | |
select 'タブ名', :yometab_name, @yometab_table | |
apply = Gtk::Button.new('適用') | |
apply.signal_connect('clicked') { create_yometab() } | |
closeup apply | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment