Skip to content

Commit

Permalink
Merge pull request #123 from isaqxd/master
Browse files Browse the repository at this point in the history
Ficha Herois do Eclipse 1.0
  • Loading branch information
alyssonrpg authored Aug 27, 2024
2 parents e9982a4 + 674d912 commit 5ae164a
Show file tree
Hide file tree
Showing 61 changed files with 15,669 additions and 0 deletions.
2,210 changes: 2,210 additions & 0 deletions Plugins/Sheets/Ficha HeroisdoEclipse/1.lfm

Large diffs are not rendered by default.

185 changes: 185 additions & 0 deletions Plugins/Sheets/Ficha HeroisdoEclipse/FichaMultiaba.lfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
<?xml version="1.0" encoding="UTF-8"?>
<form name="frm_FM" formType="sheetTemplate" dataType="Ficha_MM3e_MultiAba" title="Ficha Multiaba" align="client" theme="dark">
<scrollBox align="client">
<label left="150" top="0" width="550" height="50" rotationAngle="0" horzTextAlign="leading" text="Os códigos desta aba foram adaptados de Ambesek/RPGMeister no GitHub.\n Obrigado por compartilhar! ^^" />
<popup name="popCredit" width="210" height="120" backOpacity="0.4">
<layout left="5" top="5" width="200" height="120">
<rectangle left="0" top="0" width="200" height="110" color="#3f8270" xradius="15" yradius="15" cornerType="round"/>
<label left="0" top="1" width="200" height="50" text="● Antes de criar, estabeleça um Padrão Global no botão ao lado." fontColor="white" horzTextAlign="center"/>
<label left="0" top="40" width="200" height="70" text="● Acumular muitas abas pode gerar algum lag para carregar \n a ficha. " fontColor="white" horzTextAlign="center" margins="{top=2}"/>
</layout>
</popup>
<popup name="popupSettings" width="210" height="160" backOpacity="0.4">
<layout left="5" top="5" width="200" height="160">
<rectangle left="0" top="0" width="200" height="150" color="#3f8270" xradius="15" yradius="15" cornerType="round"/>
<label top="0" width="150" height="25" text="Cor padrão de Fundo" fontColor="white" fontStyle="bold" horzTextAlign="center"/>
<colorComboBox left="150" top="0" width="50" height="25" field="backgroundColor" color="black" useAlpha="false" hint="Muda a cor padrão da cor de fundo do editor de texto. ">
<event name="onChange">
if sheet~=nil then
self.txt.backgroundColor = sheet.backgroundColor;
default.backgroundColor = sheet.backgroundColor;
end;
</event>
</colorComboBox>

<label top="25" width="150" height="25" text="Cor padrão de Fonte" fontColor="white" fontStyle="bold" horzTextAlign="center"/>
<colorComboBox left="150" top="25" width="50" height="25" field="fontColor" color="black" useAlpha="false" hint="Muda a cor padrão da fonte do editor de texto.">
<event name="onChange">
if sheet~=nil then
self.txt.defaultFontColor = sheet.fontColor;
default.fontColor = sheet.fontColor;
end;
</event>
</colorComboBox>
<dataLink field="fontColor" defaultValue="#FFFFFF"/>

<label top="50" width="150" height="25" text="Tamanho padrão de Fonte" fontColor="white" fontStyle="bold" fontSize="11" horzTextAlign="center"/>
<edit left="150" top="50" width="50" height="25" type="number" field="fontSize" min="8" max="72">
<event name="onChange">
if sheet~=nil then
self.txt.defaultFontSize = sheet.fontSize;
default.fontSize = sheet.fontSize;
end;
</event>
</edit>
<dataLink field="fontSize" defaultValue="15"/>

<checkBox top="75" width="200" height="25" text="Ocultar barra de edição" fontColor="white" vertTextAlign="center" field="showToolbar">
<event name="onChange">
if sheet~=nil then
self.txt.showToolbar = not sheet.showToolbar;
default.showToolbar = sheet.showToolbar;
end;
</event>
</checkBox>

<checkBox top="100" width="200" height="25" text="Padrão Global." fontColor="white" vertTextAlign="center" field="global" hint="Vai usar essas configurações em todas as abas.">
<event name="onChange">
if sheet~=nil then
default.global = sheet.global;
end;
</event>
</checkBox>

<button top="125" width="200" height="25" text="Padrão Global." hint="Vai usar as últimas configurações usadas em outras abas nessa.">
<event name="onClick">
if sheet~=nil then
local default = NDB.load("defaults.xml");

sheet.showToolbar = default.showToolbar;
self.txt.showToolbar = not sheet.showToolbar;

sheet.fontSize = default.fontSize;
self.txt.defaultFontSize = sheet.fontSize;

sheet.fontColor = default.fontColor;
self.txt.defaultFontColor = sheet.fontColor;

sheet.backgroundColor = default.backgroundColor;
self.txt.backgroundColor = sheet.backgroundColor;
end;
</event>
</button>

</layout>
</popup>
<script><![CDATA[
local default = NDB.load("defaults.xml");
--colocar algo para quando sheet terminar de carregar puxar os valores de default.
local function dump(o)
if type(o) == 'table' then
local s = '{ '
for k,v in pairs(o) do
if type(k) ~= 'number' then k = '"'..k..'"' end
s = s .. '['..k..'] = ' .. dump(v) .. ','
end
return s .. '} '
else
return tostring(o)
end
end
local function loadDefault()
if sheet==nil then return end;
if default.global then
sheet.showToolbar = default.showToolbar;
sheet.fontSize = default.fontSize;
sheet.fontColor = default.fontColor;
sheet.backgroundColor = default.backgroundColor;
sheet.global = true;
end;
self.txt.showToolbar = not sheet.showToolbar;
self.txt.defaultFontSize = sheet.fontSize;
self.txt.defaultFontColor = sheet.fontColor;
self.txt.backgroundColor = sheet.backgroundColor;
end;
]]>
</script>
<layout align="top">
<layout align="left" width="150">
<button left="0" top="0" width="45" height="45" text="" onClick="self.rclAbas:append();" hint="Adiciona nova aba. ">
<image left="5" top="5" width="35" height="35" src="images/addIcon.png"/>
</button>
<button left="50" top="0" width="45" height="45" text="" name="settingsBT" hint="Opções da ficha.">
<image left="5" top="5" width="35" height="35" src="images/config.png"/>
<event name="onClick">
loadDefault();
local pop = self:findControlByName("popupSettings");

if pop ~= nil then
pop:setNodeObject(self.sheet);
pop:showPopupEx("bottom", self.settingsBT);
else
showMessage("Ops, bug.. nao encontrei o popup de opções para exibir");
end;
</event>
</button>
<button left="100" top="0" width="45" height="45" text="" name="creditBt">
<image left="5" top="5" width="35" height="35" src="images/helpIcon.png"/>
<event name="onClick">
local pop = self:findControlByName("popCredit");

if pop ~= nil then
pop:setNodeObject(self.sheet);
pop:showPopupEx("bottom", self.creditBt);
else
showMessage("Ops, bug.. nao encontrei o popup de creditos para exibir");
end;
</event>
</button>
</layout>
<layout align="client">
<recordList name="rclAbas" field="abas" templateForm="frm_FM_Aba" align="top" height="46" selectable="true" layout="horizontal">
<event name="onSelect">
local node = self.rclAbas.selectedNode;
self.boxTexto.node = node;
self.boxTexto.visible = (node ~= nil);
</event>
<event name="onEndEnumeration">
if self.rclAbas.selectedNode == nil and sheet ~= nil then
local nodes = NDB.getChildNodes(sheet.abas);

if #nodes > 0 then
self.rclAbas.selectedNode = nodes[1];
end;
end;
</event>
</recordList>
</layout>
</layout>
<layout align="client">
<dataScopeBox name="boxTexto" align="client" visible="false">
<richEdit name="txt" align="client" backgroundColor="black" defaultFontColor="white" field="txt" hideSelection="false" animateImages="true">
<event name="onMouseMove">
loadDefault();
</event>
</richEdit>
</dataScopeBox>
</layout>
</scrollBox>
</form>
63 changes: 63 additions & 0 deletions Plugins/Sheets/Ficha HeroisdoEclipse/FichaMultiaba_Aba.lfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<form name="frm_FM_Aba" height="25" width="125" theme="dark" margins="{right=2}">
<rectangle align="client" strokeColor="black" hitTest="false" strokeSize="2" color="#000000FF"/>

<edit left="0" top="0" width="75" height="25" field="nome_aba" name="name_aba" transparent="true" fontSize="10">
<event name="onEnter">
self.name_aba.transparent = false;
</event>
<event name="onExit">
self.name_aba.transparent = true;
</event>
</edit>

<imageCheckBox name="cbxInvisivel" left="77" top="2" width="20" height="20" checkedImage="images/invisivel.png" uncheckedImage="images/visivel.png" autoChange="false" onClick="self:alternarVisibilidade();" hint="Altera a visibilidade entre somente o mestre e todos. "/>

<button left="100" top="0" width="25" height="25" text="X" opacity="0.5" hint="Apaga a aba. ">
<event name="onClick">
Dialogs.confirmOkCancel("Tem certeza que quer apagar essa aba?",
function (confirmado)
if confirmado then
NDB.deleteNode(sheet);
end;
end);
</event>
</button>

<script>
function self:alternarVisibilidade()
if self.cbxInvisivel.checked then
NDB.setPermission(sheet, "group", "jogadores", "read", nil);
NDB.setPermission(sheet, "group", "espectadores", "read", nil);
else
NDB.setPermission(sheet, "group", "jogadores", "read", "deny");
NDB.setPermission(sheet, "group", "espectadores", "read", "deny");
end;
end;
function self:atualizarCbxInvisivel()
self.cbxInvisivel.checked = NDB.getPermission(sheet, "group", "espectadores", "read") == "deny" or
NDB.getPermission(sheet, "group", "jogadores", "read") == "deny"
self.cbxInvisivel.enabled = NDB.testPermission(sheet, "writePermissions");
end;
</script>

<event name="onScopeNodeChanged">
if self.observer ~= nil then
self.observer.enabled = false;
self.observer = nil;
end;

if sheet ~= nil then
self.observer = NDB.newObserver(sheet);
self.observer.onPermissionListChanged =
function(node)
self:atualizarCbxInvisivel();
end;
self.observer.onFinalPermissionsCouldBeChanged =
function(node)
self:atualizarCbxInvisivel();
end;
self:atualizarCbxInvisivel();
end;
</event>
</form>
7 changes: 7 additions & 0 deletions Plugins/Sheets/Ficha HeroisdoEclipse/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
MODELO DE FICHA PERSONALIZADO PARA O RRPG FIRECAST

Creditos ao VinnyAmbesek pela ficha multi-aba e por ter upado mutantes e malfeitores para ter como base.

Lobodosgames pela ajuda a intender a logica e programação da ficha.

Overlordnathaniel e Supercao pela ajuda no front-end da ficha.
11 changes: 11 additions & 0 deletions Plugins/Sheets/Ficha HeroisdoEclipse/herois.eclipse.lfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<form name="Herois_Eclipse" formType="sheetTemplate" dataType="Herois.Eclipse" title="Hero_Eclipse" align="client" theme="default">
<tabControl align='client'>
<tab title='Frente'>
<import file="1.lfm"/>
</tab>
<tab title='Multi-Abas'>
<import file='FichaMultiaba.lfm'/>
</tab>
</tabControl>
</form>
Binary file added Plugins/Sheets/Ficha HeroisdoEclipse/images/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions Plugins/Sheets/Ficha HeroisdoEclipse/module.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<module sdkVersion="3.7b">
<!--"id" identifica seu plug-in de forma global. Deve ser exclusivo, conter apenas caracteres alfanuméricos, underlines, pontos e deve conter pelo menos 5 caracteres e um máximo de 40. Depois de definir o ID, você não deve alterá-lo ;)-->
<id>rrpg.hero.tham</id>
<!--"version" é a versão do seu plugin. Quando você lança uma nova versão do seu módulo, altere aqui =)-->
<version>1.0</version>
<info lang="pt-BR">
<!--Informações do plugin na língua "pt-BR". Você pode ter várias tags "info", uma para cada tradução que quiser.-->
<name>Hero.Eclipse</name>
<description>Modelo personalizado da ficha mutantes e malfeitores</description>
<author>isaq_xd</author>
<site>[email protected]</site>
<contact>discord.isaq_xd</contact>
</info>
</module>
Binary file not shown.
Binary file not shown.
10 changes: 10 additions & 0 deletions Plugins/Sheets/Ficha HeroisdoEclipse/sdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# API do SDK 3 (Software Development Kit)

O motor de funcionamento do SDK3 é dividido entre duas entidades:

- Código binário em pascal, embutido no rrpg.exe ou FirecastMobile
- Código lua que faz a ponte entre seu código .lua e o código binário.

Esta pasta contém o código lua que faz a ponte entre os dois mundos!

Observação: Quando você realiza o comando "rdk p", o conteúdo desta pasta é copiado para a subpasta /sdk do seu projeto.
Loading

0 comments on commit 5ae164a

Please sign in to comment.