Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • solarus solarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 222
    • Issues 222
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Solarus Games
  • solarussolarus
  • Issues
  • #1285

Closed
Open
Created Oct 24, 2018 by llamazing@llamazing

Text surfaces should automatically update text set from key when language is changed

Current behavior of a text surface that has its text set using the method text_surface:set_text_key(key) is that the text is simply set one time to the localized string in the current language, equivalent to text_surface:set_text(sol.language.get_string(key)).

A better implementation would be to update each active text surface with a new localized string whenever the language is changed. Text surfaces with text set using the method text_surface:set_text(text) would not need to be updated when the language is changed.

I envision the engine keeping track of a list of text surfaces to be updated whenever the language is changed, and text surfaces would be added to that list when the set_text_key() method is called. They would then be removed from the list if the method set_text() is called.

Discussion from forums: http://forum.solarus-games.org/index.php/topic,1253.0.html

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking