Tooltips to every element!
This commit is contained in:
@@ -128,20 +128,28 @@ func (op *OptionsProfile) Initialize(update bool, lp func()) {
|
||||
|
||||
|
||||
// Profile name.
|
||||
profile_name_tooltip := "This how you will see profile on profiles lists."
|
||||
pn_hbox := gtk.NewHBox(false, 0)
|
||||
pn_label := gtk.NewLabel("Profile name:")
|
||||
sep1 := gtk.NewHSeparator()
|
||||
pn_label.SetTooltipText(profile_name_tooltip)
|
||||
profile_name_sep := gtk.NewHSeparator()
|
||||
profile_name_sep.SetTooltipText(profile_name_tooltip)
|
||||
op.profile_name = gtk.NewEntry()
|
||||
op.profile_name.SetTooltipText(profile_name_tooltip)
|
||||
pn_hbox.PackStart(pn_label, false, true, 5)
|
||||
pn_hbox.PackStart(sep1, true, true, 5)
|
||||
pn_hbox.PackStart(profile_name_sep, true, true, 5)
|
||||
pn_hbox.PackStart(op.profile_name, true, true, 5)
|
||||
op.vbox.PackStart(pn_hbox, false, true, 5)
|
||||
|
||||
// Urban Terror version.
|
||||
urt_version_tooltip := "Urban Terror version for which this profile applies."
|
||||
urt_version_hbox := gtk.NewHBox(false, 0)
|
||||
urt_version_label := gtk.NewLabel("Urban Terror version:")
|
||||
urt_version_label.SetTooltipText(urt_version_tooltip)
|
||||
urt_version_sep := gtk.NewHSeparator()
|
||||
urt_version_sep.SetTooltipText(urt_version_tooltip)
|
||||
op.urt_version_combo = gtk.NewComboBoxText()
|
||||
op.urt_version_combo.SetTooltipText(urt_version_tooltip)
|
||||
op.urt_version_combo.AppendText("4.2.023")
|
||||
op.urt_version_combo.AppendText("4.3.0")
|
||||
op.urt_version_combo.SetActive(1)
|
||||
@@ -151,20 +159,27 @@ func (op *OptionsProfile) Initialize(update bool, lp func()) {
|
||||
op.vbox.PackStart(urt_version_hbox, false, true, 5)
|
||||
|
||||
// Urban Terror binary path.
|
||||
select_binary_tooltip := "Urban Terror binary. Some checks will be executed, so make sure you have selected right binary:\n\nQuake3-UrT.i386 for linux-x86\nQuake3-UrT.x86_64 for linux-amd64\nQuake3-UrT.app for macOS"
|
||||
binpath_hbox := gtk.NewHBox(false, 0)
|
||||
binpath_label := gtk.NewLabel("Urban Terror binary:")
|
||||
sep2 := gtk.NewHSeparator()
|
||||
binpath_label.SetTooltipText(select_binary_tooltip)
|
||||
binpath_sep := gtk.NewHSeparator()
|
||||
binpath_sep.SetTooltipText(select_binary_tooltip)
|
||||
op.binary_path = gtk.NewEntry()
|
||||
op.binary_path.SetTooltipText(select_binary_tooltip)
|
||||
button_select_binary := gtk.NewButtonWithLabel("Browse")
|
||||
button_select_binary.SetTooltipText(select_binary_tooltip)
|
||||
button_select_binary.Clicked(op.browseForBinary)
|
||||
binpath_hbox.PackStart(binpath_label, false, true, 5)
|
||||
binpath_hbox.PackStart(sep2, true, true, 5)
|
||||
binpath_hbox.PackStart(binpath_sep, true, true, 5)
|
||||
binpath_hbox.PackStart(op.binary_path, true, true, 5)
|
||||
binpath_hbox.PackStart(button_select_binary, false, true, 5)
|
||||
op.vbox.PackStart(binpath_hbox, false, true, 5)
|
||||
|
||||
// Should we use additional X session?
|
||||
another_x_tooltip := "If this is checked, Urban Terror will be launched in another X session.\n\nThis could help if you're experiencing visual lag, glitches and FPS drops under compositing WMs, like Mutter and KWin."
|
||||
op.another_x_session = gtk.NewCheckButtonWithLabel("Start Urban Terror in another X session?")
|
||||
op.another_x_session.SetTooltipText(another_x_tooltip)
|
||||
op.vbox.PackStart(op.another_x_session, false, true, 5)
|
||||
// macOS can't do that :).
|
||||
if runtime.GOOS == "darwin" {
|
||||
@@ -172,10 +187,14 @@ func (op *OptionsProfile) Initialize(update bool, lp func()) {
|
||||
}
|
||||
|
||||
// Additional game parameters.
|
||||
params_tooltip := "Additional parameters that will be passed to Urban Terror executable."
|
||||
params_hbox := gtk.NewHBox(false, 0)
|
||||
params_label := gtk.NewLabel("Additional parameters:")
|
||||
params_label.SetTooltipText(params_tooltip)
|
||||
params_sep := gtk.NewHSeparator()
|
||||
params_sep.SetTooltipText(params_tooltip)
|
||||
op.additional_parameters = gtk.NewEntry()
|
||||
op.additional_parameters.SetTooltipText(params_tooltip)
|
||||
params_hbox.PackStart(params_label, false, true, 5)
|
||||
params_hbox.PackStart(params_sep, true, true, 5)
|
||||
params_hbox.PackStart(op.additional_parameters, true, true, 5)
|
||||
@@ -190,6 +209,7 @@ func (op *OptionsProfile) Initialize(update bool, lp func()) {
|
||||
buttons_sep := gtk.NewHSeparator()
|
||||
|
||||
cancel_button := gtk.NewButtonWithLabel("Cancel")
|
||||
cancel_button.SetTooltipText("Close without saving")
|
||||
cancel_button.Clicked(op.closeByCancel)
|
||||
buttons_box.PackStart(cancel_button, false, true, 5)
|
||||
|
||||
@@ -198,8 +218,10 @@ func (op *OptionsProfile) Initialize(update bool, lp func()) {
|
||||
add_button := gtk.NewButton()
|
||||
if op.update {
|
||||
add_button.SetLabel("Update")
|
||||
add_button.SetTooltipText("Update profile")
|
||||
} else {
|
||||
add_button.SetLabel("Add")
|
||||
add_button.SetTooltipText("Add profile")
|
||||
}
|
||||
add_button.Clicked(op.saveProfile)
|
||||
buttons_box.PackStart(add_button, false, true, 5)
|
||||
|
Reference in New Issue
Block a user