1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-12 10:04:40 +02:00

Merge pull request #916 from linaori/add-evo-tooltip

Added a tooltip to explain the evolution button
This commit is contained in:
Lynn 2019-05-26 13:40:42 +02:00 committed by GitHub
commit 421e78a2b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 82 additions and 17 deletions

View File

@ -276,7 +276,12 @@ local function player_joined(event)
return
end
player.gui.top.add {name = main_button_name, type = 'sprite-button', sprite = 'item/blueprint'}
player.gui.top.add({
name = main_button_name,
type = 'sprite-button',
sprite = 'item/blueprint',
tooltip = {'blueprint_helper.tooltip'}
})
end
local function draw_filters_table(event)

View File

@ -93,14 +93,14 @@ local function player_joined(event)
local evolution_factor = get_evolution_percentage()
local alien_name = get_alien_name(evolution_factor)
player.gui.top.add(
{
name = main_button_name,
type = 'sprite-button',
sprite = 'entity/' .. alien_name,
number = evolution_factor * 100
}
).enabled = false
player.gui.top.add({
name = main_button_name,
type = 'sprite-button',
sprite = 'entity/' .. alien_name,
number = evolution_factor * 100,
tooltip = {'evolution_progress.tooltip'},
enabled = false
})
end
local function on_nth_tick()

View File

@ -670,7 +670,12 @@ local function player_created(event)
end
local gui = player.gui
gui.top.add {type = 'sprite-button', name = main_button_name, sprite = 'virtual-signal/signal-info'}
gui.top.add({
type = 'sprite-button',
name = main_button_name,
sprite = 'virtual-signal/signal-info',
tooltip = {'info.tooltip'}
})
rewarded_players[player.index] = 0
reward_player(player, info_tab_flags[1])

View File

@ -98,7 +98,12 @@ local function player_joined(event)
return
end
player.gui.top.add {name = main_button_name, type = 'sprite-button', sprite = 'utility/spray_icon'}
player.gui.top.add({
name = main_button_name,
type = 'sprite-button',
sprite = 'utility/spray_icon',
tooltip = {'paint.tooltip'}
})
end
local function draw_filters_table(event)

View File

@ -631,7 +631,12 @@ local function player_joined(event)
local top = gui.top
if not top[main_button_name] then
top.add {type = 'sprite-button', name = main_button_name, sprite = 'entity/character'}
top.add({
type = 'sprite-button',
name = main_button_name,
sprite = 'entity/character',
tooltip = {'player_list.tooltip'}
})
end
for _, p in ipairs(game.connected_players) do

View File

@ -809,7 +809,12 @@ local function player_joined(event)
update_poll_viewer(data)
end
else
gui.top.add {type = 'sprite-button', name = main_button_name, sprite = 'item/programmable-speaker'}
gui.top.add({
type = 'sprite-button',
name = main_button_name,
sprite = 'item/programmable-speaker',
tooltip = {'poll.tooltip'}
})
end
end

View File

@ -29,7 +29,12 @@ local function create_score_gui(event)
local top = player.gui.top
if not top[main_button_name] then
top.add({type = 'sprite-button', name = main_button_name, sprite = 'achievement/there-is-no-spoon'})
top.add({
type = 'sprite-button',
name = main_button_name,
sprite = 'achievement/there-is-no-spoon',
tooltip = {'score.tooltip'}
})
end
end

View File

@ -131,7 +131,12 @@ local function player_joined(event)
return
end
player.gui.top.add {name = main_button_name, type = 'sprite-button', caption = 'tag'}
player.gui.top.add({
name = main_button_name,
type = 'sprite-button',
caption = 'tag',
tooltip = {'tag_group.tooltip'}
})
end
local function draw_main_frame_content(parent)

View File

@ -626,7 +626,12 @@ local function player_joined(event)
local top = gui.top
if not top[main_button_name] then
top.add {type = 'sprite-button', name = main_button_name, sprite = 'item/repair-pack'}
top.add({
type = 'sprite-button',
name = main_button_name,
sprite = 'item/repair-pack',
tooltip = {'tasklist.tooltip'}
})
end
end

View File

@ -1,6 +1,7 @@
# This file holds all the locale strings for guis
[info]
tooltip=RedMew Info
welcome_header=Welcome to Redmew!
welcome_text=Redmew is a community for players of all skill levels committed to pushing the limits of Factorio Multiplayer through custom scripts and crazy map designs.\n\nWe are a friendly bunch, our objective is to have as much fun as possible and we hope you will too.
chatting_header=How To Chat
@ -47,6 +48,7 @@ toast_all=__1__ sent a toast to all players.
toast_player=__1__ sent a toast to __2__.
[player_list]
tooltip=Player list
title=Player list - Online: __1__ Total: __2__
name_caption=Name __1__
time_caption=Time __1__
@ -60,4 +62,25 @@ report_tooltip=Report player to the admin team for griefing or breaking the rule
report_button_tooltip=Report __1__
close_caption=Close
poke_notify_caption=Notify me when pokes happen.
poke_notify_tooltip=Receive a message when a player pokes another player.
poke_notify_tooltip=Receive a message when a player pokes another player.
[evolution_progress]
tooltip=Alien evolution progress
[blueprint_helper]
tooltip=Blueprint helper
[paint]
tooltip=Landscape painting tool
[tag_group]
tooltip=Player tag group management
[poll]
tooltip=View and manage polls
[score]
tooltip=Score
[tasklist]
tooltip=View and manage Tasks

View File

@ -72,6 +72,7 @@ local function on_player_created(event)
name = 'Diggy.CoinGathering.Button',
type = 'sprite-button',
sprite = 'item/coin',
tooltip = 'Diggy scoretable'
})
end

View File

@ -529,6 +529,7 @@ local function on_player_created(event)
name = 'Diggy.Experience.Button',
type = 'sprite-button',
sprite = 'entity/market',
tooltip = 'Diggy leveling progress',
})
end