Add contextual menu to change colors in disasm, Add rlogo on topbar
This commit is contained in:
parent
68bb69e205
commit
abe9a34def
4 changed files with 22 additions and 9 deletions
|
|
@ -39,8 +39,9 @@
|
|||
<body>
|
||||
|
||||
<!-- NORTH -->
|
||||
<div id="radareApp_mp_toolbar" class="ui-layout-north ui-widget-content" style="display: none;background-color:rgb(20,20,20);color: white;text-align: center;font-family: monospace;">
|
||||
radare2
|
||||
<div id="radareApp_mp_toolbar" class="ui-layout-north ui-widget-content" style="display: none;background-color:rgb(20,20,20);color: white;text-align: left;font-family: monospace;">
|
||||
<img src="rlogo-inv.png" border="0">
|
||||
|
||||
</div>
|
||||
|
||||
<!-- SOUTH -->
|
||||
|
|
|
|||
|
|
@ -119,7 +119,8 @@ $(document).ready( function() {
|
|||
{title: "rename<kbd>n</kbd>", cmd: "rename"},
|
||||
{title: "add comment<kbd>;</kbd>", cmd: "comment"},
|
||||
{title: "code<kbd>c</kbd>", cmd: "define"},
|
||||
{title: "undefine<kbd>u</kbd>", cmd: "undefine"}
|
||||
{title: "undefine<kbd>u</kbd>", cmd: "undefine"},
|
||||
{title: "random colors<kbd>R</kbd>", cmd: "randomcolors"}
|
||||
],
|
||||
preventSelect: true,
|
||||
preventContextMenuForPopup: true,
|
||||
|
|
@ -170,7 +171,8 @@ $(document).ready( function() {
|
|||
{title: "rename<kbd>n</kbd>", cmd: "rename"},
|
||||
{title: "add comment<kbd>;</kbd>", cmd: "comment"},
|
||||
{title: "code<kbd>c</kbd>", cmd: "define"},
|
||||
{title: "undefine<kbd>u</kbd>", cmd: "undefine"}
|
||||
{title: "undefine<kbd>u</kbd>", cmd: "undefine"},
|
||||
{title: "random colors<kbd>R</kbd>", cmd: "randomcolors"}
|
||||
];
|
||||
if (xreffrom_submenu !== null || xrefto_submenu !== null) {
|
||||
if (xrefto_submenu !== null) menu[menu.length] = xrefto_submenu;
|
||||
|
|
@ -214,11 +216,14 @@ $(document).ready( function() {
|
|||
address = ui.cmd.substring(ui.cmd.indexOf("jumpto_") + 7);
|
||||
do_jumpto(address);
|
||||
}
|
||||
if (ui.cmd == "goto") do_goto();
|
||||
if (ui.cmd == "comment") do_comment(target);
|
||||
if (ui.cmd == "rename") do_rename(target, event);
|
||||
if (ui.cmd == "define") do_define(target);
|
||||
if (ui.cmd == "undefine") do_undefine(target);
|
||||
switch (ui.cmd) {
|
||||
case "goto": do_goto(); break;
|
||||
case "comment": do_comment(target); break;
|
||||
case "rename": do_rename(target, event); break;
|
||||
case "define": do_define(target); break;
|
||||
case "undefine": do_undefine(target); break;
|
||||
case "randomcolors": do_randomcolors(target); break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -393,6 +398,12 @@ function do_jumpto(address) {
|
|||
scroll_to_address(r2ui._dis.tmp_address);
|
||||
}
|
||||
|
||||
function do_randomcolors(element, inEvent) {
|
||||
r2.cmd ('ecr', function() {
|
||||
r2ui.load_colors ();
|
||||
});
|
||||
}
|
||||
|
||||
function do_rename(element, inEvent) {
|
||||
var address = get_address_from_class(element);
|
||||
if ($(element).hasClass("addr") && $(element).hasClass("flag")) {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ SettingsPanel.prototype.render = function() {
|
|||
var settings = '<div><h3>Settings:</h3><br/>';
|
||||
settings += '<div>Test: <input id="test" type="checkbox" /></div>';
|
||||
settings += '</div><br/>';
|
||||
settings += '<div><input value="Randomize colors" type="button" onclick="r2.cmd(\'ecr\');"></div>';
|
||||
var html = settings + colors;
|
||||
$('#settings_tab').html(html);
|
||||
$('#settings_tab').css('color', "rgb(127,127,127);");
|
||||
|
|
|
|||
BIN
shlr/www/p/rlogo-inv.png
Normal file
BIN
shlr/www/p/rlogo-inv.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Loading…
Reference in a new issue