-
Notifications
You must be signed in to change notification settings - Fork 34
Feature/debugger #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Feature/debugger #40
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the current intention of this I suggest the module name DebugUI instead of Debugger to avoid any confusion on what this is for and how it can be used.
The fully qualified name would be CF.DebugUI / CF_DebugUI
Also, where is the logic that opens the GUI and maintains data updates?
| { | ||
| if (m_Entries[i].Key == "") m_Entries[i].Key = " "; | ||
| if (m_Entries[i].Value == "") m_Entries[i].Value = " "; | ||
| GetTemplateController().EntryKeys = GetTemplateController().EntryKeys + m_Entries[i].Key + "\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetTemplateController().EntryKeys is fetched twice, but wasn't it overridden in line 93? So shouldn't it just be "" or delete completly?
| { | ||
| return "JM/CF/Debugger/layouts/Debugger_Block.layout"; | ||
| } | ||
| }; No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add one empty line at the end of each text file for git. e.g.
class Name
{
};
| Retrieves the Debugger block if it exists based on the name and if specified, the target. | ||
| Creates a new block if no existing block was found. | ||
| */ | ||
| Class Get(string name, Object target = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is class returned and not a block type?
| /* | ||
| Get all blocks by name, if no name specified, get all blocks | ||
| */ | ||
| array<Class> GetAll(string name = "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, why an array of classes and not an array of blocks
| { | ||
| m_Blocks = new array<ref CF_Debugger_Block>(); | ||
|
|
||
| m_IsEnabled = FileExist("$profile:CF_Debugger.txt"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does it need this file? There should be a way to enable and disable this purely via script and or startup parameter?
e.g. DayZ.exe -CF_DebugUI
| hexactsize 0 | ||
| vexactsize 0 | ||
| scriptclass "ViewBinding" | ||
| text "deserunt mollit anim id est laborum.\""\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this sample text for the release and just replace it with a short "PLACEHOLDER"?
| CF_Permission_ManagerBase._Init( Permission ); | ||
| #endif | ||
|
|
||
| Debugger = new CF_Debugger(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this on world init and not game init? Is it because of UI components?
|
|
||
| class CF_Debugger | ||
| { | ||
| private autoptr array<ref CF_Debugger_Block> m_Blocks; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should use protected. I see no reason why someone could not inherit their own variant and replace their local CF.Debugger instance at runtime with their own type.
| @@ -0,0 +1,5 @@ | |||
| class CF_Debugger_Block_Controller: Controller | |||
| { | |||
| string EntryKeys; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keys = plural? How are multiple keys stored here?
| */ | ||
| static void _Cleanup() | ||
| { | ||
| delete Debugger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No cleanup required? To safely close UI and delete all data?
No description provided.