Fix R2 feature info checkbox, kaetemi/ryzomclassic#158

ryzomclassic-develop
kaetemi 4 years ago
parent 7a9accde11
commit b61ad76ac2

@ -3064,13 +3064,13 @@ text_y="-2"
<!--<view type="text" id="help_text" posref="TL TL" posparent="parent" x="0" y="-14" color="255 255 255 255" fontsize="12" shadow="true"
global_color="true" hardtext="" multi_line="true" multi_line_space="0" />
-->
<ctrl type="button" id="custom_bbox_enabled" button_type="toggle_button" posref="BL BL" posparent="tb_enclosing" x="0" y="-14"
<ctrl type="button" id="show_again" button_type="toggle_button" posref="BL BL" posparent="tb_enclosing" x="0" y="-14"
tx_normal="w_slot_on.tga" tx_pushed="w_opacity_on.tga" tx_over="w_slot_on.tga" pushed="true"
color="255 255 255 255" col_pushed="255 255 255 255" col_over="255 255 255 0"
onclick_l="lua"
params_l="r2.CustomBBox:updateFromUI()"
/>
<view type="text" id="text_custom" posparent="custom_bbox_enabled" posref="MR ML" x="4" y="-3" global_color="true" fontsize="12" shadow="true" hardtext="uiR2showMessageAgain" auto_clamp="true"/>
<view type="text" id="show_again_label" posparent="show_again" posref="MR ML" x="4" y="-3" global_color="true" fontsize="12" shadow="true" hardtext="uiR2showMessageAgain" auto_clamp="true"/>
<ctrl style="button_ok" x="0" y="6" posref="BM BM" text_y="0"
onclick_l="proc" params_l="help_close" hardtext="uittOK" />

@ -1027,9 +1027,9 @@ r2.displayFeatureHelp = function(className)
assert(nil)
end
local checkBox = getUI("ui:interface:feature_help:content:custom_bbox_enabled")
local checkBox = getUI("ui:interface:feature_help:content:show_again")
assert(checkBox)
local chkBoxText = getUI("ui:interface:feature_help:content:text_custom")
local chkBoxText = getUI("ui:interface:feature_help:content:show_again_label")
assert(chkBoxText)
if className == "Npc" then
@ -1082,21 +1082,21 @@ end
function r2.setFeatureDisplayHelp()
local checkBox = getUI("ui:interface:feature_help:content:custom_bbox_enabled")
local checkBox = getUI("ui:interface:feature_help:content:show_again")
assert(checkBox)
local isChecked = checkBox.pushed
debugInfo("checked: " ..tostring(isChecked))
local showAgain = checkBox.pushed
--debugInfo("checked: " ..tostring(showAgain))
local ui = getUI("ui:interface:feature_help")
local name = ui.Env.uc_title
local len = string.len(name) - 10 - 6
local className = string.sub(name, -10-len, 6+len) --removing uiR2Ed and _HelpTitle
--formName = formName .."Form"
assert(className)
--debugInfo("Form name: " ..formName)
if isChecked == false then
if showAgain then
r2.setDisplayInfo(className, 1)
else r2.setDisplayInfo(className, 0) end

Loading…
Cancel
Save