Compare commits
2 Commits
v0.1.3-tes
...
v0.1.3-tes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a017170c71 | ||
|
|
d38d2edee3 |
@@ -228,8 +228,6 @@ type guiApp struct {
|
|||||||
tabSettings uintptr
|
tabSettings uintptr
|
||||||
btnTopMost uintptr
|
btnTopMost uintptr
|
||||||
btnAutoUnmute uintptr
|
btnAutoUnmute uintptr
|
||||||
btnFontDown uintptr
|
|
||||||
btnFontUp uintptr
|
|
||||||
activeTab string
|
activeTab string
|
||||||
topMost bool
|
topMost bool
|
||||||
autoUnmuteOnLeave bool
|
autoUnmuteOnLeave bool
|
||||||
@@ -586,8 +584,6 @@ func runNativeGUI(initialTab string) error {
|
|||||||
rightTitle, _ := syscall.UTF16PtrFromString("")
|
rightTitle, _ := syscall.UTF16PtrFromString("")
|
||||||
topMostTitle, _ := syscall.UTF16PtrFromString("Top most")
|
topMostTitle, _ := syscall.UTF16PtrFromString("Top most")
|
||||||
autoUnmuteTitle, _ := syscall.UTF16PtrFromString("Leave unmute")
|
autoUnmuteTitle, _ := syscall.UTF16PtrFromString("Leave unmute")
|
||||||
fontDownTitle, _ := syscall.UTF16PtrFromString("A-")
|
|
||||||
fontUpTitle, _ := syscall.UTF16PtrFromString("A+")
|
|
||||||
browseTitle, _ := syscall.UTF16PtrFromString("参照")
|
browseTitle, _ := syscall.UTF16PtrFromString("参照")
|
||||||
saveTitle, _ := syscall.UTF16PtrFromString("保存")
|
saveTitle, _ := syscall.UTF16PtrFromString("保存")
|
||||||
toolbarTitle, _ := syscall.UTF16PtrFromString("")
|
toolbarTitle, _ := syscall.UTF16PtrFromString("")
|
||||||
@@ -635,8 +631,6 @@ func runNativeGUI(initialTab string) error {
|
|||||||
app.settingsPaneHwnd, _, _ = createWindowEx.Call(0, uintptr(unsafe.Pointer(paneClassName)), uintptr(unsafe.Pointer(settingsPaneTitle)), paneStyle, 0, contentTop, windowWidth, settingsPaneHeight, hwnd, idLog+1, hInstance, 0)
|
app.settingsPaneHwnd, _, _ = createWindowEx.Call(0, uintptr(unsafe.Pointer(paneClassName)), uintptr(unsafe.Pointer(settingsPaneTitle)), paneStyle, 0, contentTop, windowWidth, settingsPaneHeight, hwnd, idLog+1, hInstance, 0)
|
||||||
app.btnTopMost, _, _ = createWindowEx.Call(0, uintptr(unsafe.Pointer(buttonClass)), uintptr(unsafe.Pointer(topMostTitle)), buttonStyle, leftPaneWidth+32, contentTop+86, 140, 30, hwnd, 3005, hInstance, 0)
|
app.btnTopMost, _, _ = createWindowEx.Call(0, uintptr(unsafe.Pointer(buttonClass)), uintptr(unsafe.Pointer(topMostTitle)), buttonStyle, leftPaneWidth+32, contentTop+86, 140, 30, hwnd, 3005, hInstance, 0)
|
||||||
app.btnAutoUnmute, _, _ = createWindowEx.Call(0, uintptr(unsafe.Pointer(buttonClass)), uintptr(unsafe.Pointer(autoUnmuteTitle)), buttonStyle, leftPaneWidth+32, contentTop+132, 180, 30, hwnd, 3008, hInstance, 0)
|
app.btnAutoUnmute, _, _ = createWindowEx.Call(0, uintptr(unsafe.Pointer(buttonClass)), uintptr(unsafe.Pointer(autoUnmuteTitle)), buttonStyle, leftPaneWidth+32, contentTop+132, 180, 30, hwnd, 3008, hInstance, 0)
|
||||||
app.btnFontDown, _, _ = createWindowEx.Call(0, uintptr(unsafe.Pointer(buttonClass)), uintptr(unsafe.Pointer(fontDownTitle)), buttonStyle, leftPaneWidth+32, contentTop+178, 52, 30, hwnd, 3006, hInstance, 0)
|
|
||||||
app.btnFontUp, _, _ = createWindowEx.Call(0, uintptr(unsafe.Pointer(buttonClass)), uintptr(unsafe.Pointer(fontUpTitle)), buttonStyle, leftPaneWidth+92, contentTop+178, 52, 30, hwnd, 3007, hInstance, 0)
|
|
||||||
exportDirTitle, _ := syscall.UTF16PtrFromString("")
|
exportDirTitle, _ := syscall.UTF16PtrFromString("")
|
||||||
exportDirRect := settingsHistoryExportDirRect()
|
exportDirRect := settingsHistoryExportDirRect()
|
||||||
app.settingsExportDirEdit, _, _ = createWindowEx.Call(
|
app.settingsExportDirEdit, _, _ = createWindowEx.Call(
|
||||||
@@ -1216,7 +1210,7 @@ func refreshGUI(setWindowText *syscall.LazyProc, app *guiApp, reloadData bool) {
|
|||||||
if app.settingsPaneHwnd != 0 {
|
if app.settingsPaneHwnd != 0 {
|
||||||
showWindowProc.Call(app.settingsPaneHwnd, swHideControl)
|
showWindowProc.Call(app.settingsPaneHwnd, swHideControl)
|
||||||
}
|
}
|
||||||
for _, hwnd := range []uintptr{app.btnTopMost, app.btnAutoUnmute, app.btnFontDown, app.btnFontUp} {
|
for _, hwnd := range []uintptr{app.btnTopMost, app.btnAutoUnmute} {
|
||||||
if hwnd != 0 {
|
if hwnd != 0 {
|
||||||
showWindowProc.Call(hwnd, swHideControl)
|
showWindowProc.Call(hwnd, swHideControl)
|
||||||
}
|
}
|
||||||
@@ -1257,7 +1251,7 @@ func refreshSettingsControls(showWindowProc, setWindowPosProc *syscall.LazyProc,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
app.lastSettingsVisible = true
|
app.lastSettingsVisible = true
|
||||||
for _, hwnd := range []uintptr{app.btnTopMost, app.btnAutoUnmute, app.btnFontDown, app.btnFontUp} {
|
for _, hwnd := range []uintptr{app.btnTopMost, app.btnAutoUnmute} {
|
||||||
if hwnd != 0 {
|
if hwnd != 0 {
|
||||||
showWindowProc.Call(hwnd, swHideControl)
|
showWindowProc.Call(hwnd, swHideControl)
|
||||||
}
|
}
|
||||||
@@ -1281,7 +1275,7 @@ func refreshSettingsControls(showWindowProc, setWindowPosProc *syscall.LazyProc,
|
|||||||
if app.settingsPaneHwnd != 0 {
|
if app.settingsPaneHwnd != 0 {
|
||||||
showWindowProc.Call(app.settingsPaneHwnd, swHideControl)
|
showWindowProc.Call(app.settingsPaneHwnd, swHideControl)
|
||||||
}
|
}
|
||||||
for _, hwnd := range []uintptr{app.btnTopMost, app.btnAutoUnmute, app.btnFontDown, app.btnFontUp, app.settingsExportDirEdit, app.settingsExportCustomEdit, app.settingsExportBrowseBtn, app.settingsExportCustomSaveBtn} {
|
for _, hwnd := range []uintptr{app.btnTopMost, app.btnAutoUnmute, app.settingsExportDirEdit, app.settingsExportCustomEdit, app.settingsExportBrowseBtn, app.settingsExportCustomSaveBtn} {
|
||||||
if hwnd != 0 {
|
if hwnd != 0 {
|
||||||
showWindowProc.Call(hwnd, swHideControl)
|
showWindowProc.Call(hwnd, swHideControl)
|
||||||
}
|
}
|
||||||
@@ -1873,16 +1867,17 @@ func paintSettingsPane(hwnd uintptr, app *guiApp) uintptr {
|
|||||||
drawPaneText(hdc, 24, 68, "表示", app.hFont, clrMutedText)
|
drawPaneText(hdc, 24, 68, "表示", app.hFont, clrMutedText)
|
||||||
drawSettingsWideButton(hdc, settingsTopMostRect(), "Top most", onOffBool(app.topMost), app.hFont, app.topMost)
|
drawSettingsWideButton(hdc, settingsTopMostRect(), "Top most", onOffBool(app.topMost), app.hFont, app.topMost)
|
||||||
drawSettingsWideButton(hdc, settingsAutoUnmuteRect(), "Leave unmute", onOffBool(app.autoUnmuteOnLeave), app.hFont, app.autoUnmuteOnLeave)
|
drawSettingsWideButton(hdc, settingsAutoUnmuteRect(), "Leave unmute", onOffBool(app.autoUnmuteOnLeave), app.hFont, app.autoUnmuteOnLeave)
|
||||||
drawPaneText(hdc, 24, 190, "文字サイズ", app.hFont, clrMutedText)
|
drawPaneText(hdc, 24, 190, "更新間隔", app.hFont, clrMutedText)
|
||||||
drawSettingsRefreshControl(hdc, app)
|
drawSettingsRefreshControl(hdc, app)
|
||||||
|
drawPaneText(hdc, 24, 314, "文字サイズ", app.hFont, clrMutedText)
|
||||||
drawSettingsFontControl(hdc, app)
|
drawSettingsFontControl(hdc, app)
|
||||||
drawPaneText(hdc, 24, 374, "履歴 Export", app.hFont, clrMutedText)
|
drawPaneText(hdc, 24, 390, "履歴 Export", app.hFont, clrMutedText)
|
||||||
drawPaneText(hdc, 24, 396, "出力先フォルダ", app.hFont, clrMutedText)
|
drawPaneText(hdc, 24, 412, "出力先フォルダ", app.hFont, clrMutedText)
|
||||||
drawSettingsWideButton(hdc, settingsHistoryExportTimeRect(), "Time", onOffBool(app.historyExportIncludeTime), app.hFont, app.historyExportIncludeTime)
|
drawSettingsWideButton(hdc, settingsHistoryExportTimeRect(), "Time", onOffBool(app.historyExportIncludeTime), app.hFont, app.historyExportIncludeTime)
|
||||||
drawSettingsWideButton(hdc, settingsHistoryExportWorldRect(), "World", onOffBool(app.historyExportIncludeWorld), app.hFont, app.historyExportIncludeWorld)
|
drawSettingsWideButton(hdc, settingsHistoryExportWorldRect(), "World", onOffBool(app.historyExportIncludeWorld), app.hFont, app.historyExportIncludeWorld)
|
||||||
drawSettingsWideButton(hdc, settingsHistoryExportJoinLeaveRect(), "Join/Leave", onOffBool(app.historyExportIncludeJoinLeave), app.hFont, app.historyExportIncludeJoinLeave)
|
drawSettingsWideButton(hdc, settingsHistoryExportJoinLeaveRect(), "Join/Leave", onOffBool(app.historyExportIncludeJoinLeave), app.hFont, app.historyExportIncludeJoinLeave)
|
||||||
drawSettingsWideButton(hdc, settingsHistoryExportCustomToggleRect(), "Custom", onOffBool(app.historyExportCustomEnabled), app.hFont, app.historyExportCustomEnabled)
|
drawSettingsWideButton(hdc, settingsHistoryExportCustomToggleRect(), "Custom", onOffBool(app.historyExportCustomEnabled), app.hFont, app.historyExportCustomEnabled)
|
||||||
drawPaneText(hdc, 24, 516, "Custom 条件", app.hFont, clrMutedText)
|
drawPaneText(hdc, 24, 532, "Custom 条件", app.hFont, clrMutedText)
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1923,35 +1918,35 @@ func settingsFontUpRect() winRect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func settingsHistoryExportDirRect() winRect {
|
func settingsHistoryExportDirRect() winRect {
|
||||||
return winRect{Left: 116, Top: 420, Right: 636, Bottom: 444}
|
return winRect{Left: 24, Top: 436, Right: 636, Bottom: 460}
|
||||||
}
|
}
|
||||||
|
|
||||||
func settingsHistoryExportBrowseRect() winRect {
|
func settingsHistoryExportBrowseRect() winRect {
|
||||||
return winRect{Left: 644, Top: 420, Right: 736, Bottom: 444}
|
return winRect{Left: 644, Top: 436, Right: 736, Bottom: 460}
|
||||||
}
|
}
|
||||||
|
|
||||||
func settingsHistoryExportTimeRect() winRect {
|
func settingsHistoryExportTimeRect() winRect {
|
||||||
return winRect{Left: 24, Top: 452, Right: 360, Bottom: 482}
|
return winRect{Left: 24, Top: 468, Right: 360, Bottom: 498}
|
||||||
}
|
}
|
||||||
|
|
||||||
func settingsHistoryExportWorldRect() winRect {
|
func settingsHistoryExportWorldRect() winRect {
|
||||||
return winRect{Left: 376, Top: 452, Right: 736, Bottom: 482}
|
return winRect{Left: 376, Top: 468, Right: 736, Bottom: 498}
|
||||||
}
|
}
|
||||||
|
|
||||||
func settingsHistoryExportJoinLeaveRect() winRect {
|
func settingsHistoryExportJoinLeaveRect() winRect {
|
||||||
return winRect{Left: 24, Top: 488, Right: 360, Bottom: 518}
|
return winRect{Left: 24, Top: 504, Right: 360, Bottom: 534}
|
||||||
}
|
}
|
||||||
|
|
||||||
func settingsHistoryExportCustomToggleRect() winRect {
|
func settingsHistoryExportCustomToggleRect() winRect {
|
||||||
return winRect{Left: 376, Top: 488, Right: 736, Bottom: 518}
|
return winRect{Left: 376, Top: 504, Right: 736, Bottom: 534}
|
||||||
}
|
}
|
||||||
|
|
||||||
func settingsHistoryExportCustomRect() winRect {
|
func settingsHistoryExportCustomRect() winRect {
|
||||||
return winRect{Left: 116, Top: 536, Right: 636, Bottom: 558}
|
return winRect{Left: 24, Top: 552, Right: 636, Bottom: 574}
|
||||||
}
|
}
|
||||||
|
|
||||||
func settingsHistoryExportCustomSaveRect() winRect {
|
func settingsHistoryExportCustomSaveRect() winRect {
|
||||||
return winRect{Left: 644, Top: 536, Right: 736, Bottom: 558}
|
return winRect{Left: 644, Top: 552, Right: 736, Bottom: 574}
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleSettingsPaneClick(app *guiApp, x, y int32, getWindowText, setWindowText *syscall.LazyProc) bool {
|
func handleSettingsPaneClick(app *guiApp, x, y int32, getWindowText, setWindowText *syscall.LazyProc) bool {
|
||||||
@@ -2041,9 +2036,9 @@ func drawSettingsRefreshControl(hdc uintptr, app *guiApp) {
|
|||||||
drawSettingsBox(hdc, settingsRefreshValueRect(), uint32(0x0038281a), border)
|
drawSettingsBox(hdc, settingsRefreshValueRect(), uint32(0x0038281a), border)
|
||||||
drawSettingsBox(hdc, settingsRefreshUpRect(), fill, border)
|
drawSettingsBox(hdc, settingsRefreshUpRect(), fill, border)
|
||||||
drawSettingsWideButton(hdc, settingsRefreshUnitRect(), "\u5358\u4f4d", refreshIntervalUnitLabel(app.refreshIntervalUnit), font, true)
|
drawSettingsWideButton(hdc, settingsRefreshUnitRect(), "\u5358\u4f4d", refreshIntervalUnitLabel(app.refreshIntervalUnit), font, true)
|
||||||
drawCenteredPaneText(hdc, settingsRefreshDownRect(), "A-", font, clrText)
|
drawCenteredPaneText(hdc, settingsRefreshDownRect(), "-", font, clrText)
|
||||||
drawCenteredPaneText(hdc, settingsRefreshValueRect(), refreshIntervalValueLabel(app.refreshIntervalValue, app.refreshIntervalUnit), font, clrMutedText)
|
drawCenteredPaneText(hdc, settingsRefreshValueRect(), refreshIntervalValueLabel(app.refreshIntervalValue, app.refreshIntervalUnit), font, clrMutedText)
|
||||||
drawCenteredPaneText(hdc, settingsRefreshUpRect(), "A+", font, clrText)
|
drawCenteredPaneText(hdc, settingsRefreshUpRect(), "+", font, clrText)
|
||||||
}
|
}
|
||||||
|
|
||||||
func refreshIntervalValueLabel(value int, unit string) string {
|
func refreshIntervalValueLabel(value int, unit string) string {
|
||||||
@@ -2668,7 +2663,7 @@ func drawSettingsFontControl(hdc uintptr, app *guiApp) {
|
|||||||
drawSettingsBox(hdc, settingsFontValueRect(), uint32(0x0038281a), border)
|
drawSettingsBox(hdc, settingsFontValueRect(), uint32(0x0038281a), border)
|
||||||
drawSettingsBox(hdc, settingsFontUpRect(), fill, border)
|
drawSettingsBox(hdc, settingsFontUpRect(), fill, border)
|
||||||
drawCenteredPaneText(hdc, settingsFontDownRect(), "A-", font, clrText)
|
drawCenteredPaneText(hdc, settingsFontDownRect(), "A-", font, clrText)
|
||||||
drawCenteredPaneText(hdc, settingsFontValueRect(), strconv.Itoa(app.fontSize), font, clrMutedText)
|
drawCenteredPaneText(hdc, settingsFontValueRect(), strconv.Itoa(app.fontSize)+" pt", font, clrMutedText)
|
||||||
drawCenteredPaneText(hdc, settingsFontUpRect(), "A+", font, clrText)
|
drawCenteredPaneText(hdc, settingsFontUpRect(), "A+", font, clrText)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user