1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-22 03:39:09 +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 return
end 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 end
local function draw_filters_table(event) local function draw_filters_table(event)

View File

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

View File

@ -670,7 +670,12 @@ local function player_created(event)
end end
local gui = player.gui 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 rewarded_players[player.index] = 0
reward_player(player, info_tab_flags[1]) reward_player(player, info_tab_flags[1])

View File

@ -98,7 +98,12 @@ local function player_joined(event)
return return
end 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 end
local function draw_filters_table(event) local function draw_filters_table(event)

View File

@ -631,7 +631,12 @@ local function player_joined(event)
local top = gui.top local top = gui.top
if not top[main_button_name] then 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 end
for _, p in ipairs(game.connected_players) do for _, p in ipairs(game.connected_players) do

View File

@ -809,7 +809,12 @@ local function player_joined(event)
update_poll_viewer(data) update_poll_viewer(data)
end end
else 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
end end

View File

@ -29,7 +29,12 @@ local function create_score_gui(event)
local top = player.gui.top local top = player.gui.top
if not top[main_button_name] then 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
end end

View File

@ -131,7 +131,12 @@ local function player_joined(event)
return return
end 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 end
local function draw_main_frame_content(parent) local function draw_main_frame_content(parent)

View File

@ -626,7 +626,12 @@ local function player_joined(event)
local top = gui.top local top = gui.top
if not top[main_button_name] then 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
end end

View File

@ -1,6 +1,7 @@
# This file holds all the locale strings for guis # This file holds all the locale strings for guis
[info] [info]
tooltip=RedMew Info
welcome_header=Welcome to Redmew! 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. 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 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__. toast_player=__1__ sent a toast to __2__.
[player_list] [player_list]
tooltip=Player list
title=Player list - Online: __1__ Total: __2__ title=Player list - Online: __1__ Total: __2__
name_caption=Name __1__ name_caption=Name __1__
time_caption=Time __1__ time_caption=Time __1__
@ -61,3 +63,24 @@ report_button_tooltip=Report __1__
close_caption=Close close_caption=Close
poke_notify_caption=Notify me when pokes happen. 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', name = 'Diggy.CoinGathering.Button',
type = 'sprite-button', type = 'sprite-button',
sprite = 'item/coin', sprite = 'item/coin',
tooltip = 'Diggy scoretable'
}) })
end end

View File

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