fix previously mentioned issue
This commit is contained in:
parent
129dc58f66
commit
7da8b274a5
1 changed files with 7 additions and 12 deletions
|
|
@ -62,7 +62,7 @@ class UiAdventure{
|
|||
_ui.list_button(list, [0, 0], "Abort") {
|
||||
_ui.ui_mode = Ui.Info
|
||||
_game.adventures.discard()
|
||||
_page = UiAdventure.direction
|
||||
_page.value = UiAdventure.direction
|
||||
}
|
||||
_ui.list_button(list, [3, 0], "Direction") {_page.value = UiAdventure.direction}
|
||||
_ui.list_button(list, [2, 0], "People") {_page.value = UiAdventure.people}
|
||||
|
|
@ -161,18 +161,13 @@ class UiAdventure{
|
|||
UILayout.set_behave(_ent, text, UILayoutBehave.left) //|
|
||||
UILayout.set_margin(_ent, text, 4, 8, 4, 0)
|
||||
|
||||
var update_text = Fn.new{
|
||||
var adventure = _game.adventures.planning.value
|
||||
if(adventure == null) return
|
||||
var direction = full_step_names[adventure.direction]
|
||||
System.print("-----")
|
||||
System.print(adventure)
|
||||
System.print(adventure.distance)
|
||||
var dist = adventure.distance
|
||||
System.print(dist)
|
||||
UILabel.set_text(text, "%(dist)km %(direction)")
|
||||
_game.adventures.planning.on_change(true) { |val|
|
||||
if(val == null) return
|
||||
//this stuff does bad things
|
||||
var dir = full_step_names[val.direction]
|
||||
var dist = val.distance
|
||||
UILabel.set_text(text, "%(dist)km\n%(dir)")
|
||||
}
|
||||
_game.adventures.planning.on_change(true, update_text)
|
||||
}
|
||||
|
||||
people(){
|
||||
|
|
|
|||
Loading…
Reference in a new issue