PDA

View Full Version : Library Checkbox, Text & Theme alignment



zombielord
April 24th, 2020, 21:45
I've been trying to fix or remove the boxes behind the text & checkboxes but I can't seem to find the relevant section to correct this mis-alignment. Can someone point me to the file xml file, or code section to fix this.

Talyn
April 24th, 2020, 21:57
Someone could probably figure out a more optimal method but here's what I did to remove the icons altogether. First, replace CoreRPG's library_recordtype window class like so:



<windowclass name="library_recordtype">
<sizelimits>
<minimum height="34" />
</sizelimits>
<script file="utility/scripts/library_recordtype.lua" />
<script>
</script>
<sheetdata>
<stringcontrol name="name">
<anchored position="insidetopleft" offset="40,7">
<right offset="-25" />
</anchored>
<font>reference-r</font>
<multilinespacing>20</multilinespacing>
<disabled />
</stringcontrol>

<buttoncontrol name="base">
<anchored position="insidetopleft">
<right />
<bottom />
</anchored>
<description control="name" />
<script>
function onButtonPress()
DesktopManager.toggleIndex(window.getRecordType()) ;
end
</script>
</buttoncontrol>

<buttonc_checkbox name="sidebar">
<anchored height="20" width="20">
<top anchor="center" offset="-10" />
<right offset="-10" />
</anchored>
<script>
function onValueChanged()
window.onOptionChanged();
end
</script>
</buttonc_checkbox>
</sheetdata>
</windowclass>


Then in the Lua script I simply commented out the setIcon() function:



function setRecordType(sNewRecordType)
bHandleOption = false;
sRecordType = sNewRecordType;
local sDisplayText = LibraryData.getDisplayText(sRecordType);
name.setValue(sDisplayText);
--icon.setIcon(LibraryData.getDisplayIcons(sRecordTy pe));
synchState();
bHandleOption = true;
end

zombielord
April 25th, 2020, 05:13
Thank you, it worked like a charm.