This commit is contained in:
2026-05-14 14:52:36 +09:00
parent 903a32931d
commit c4a2f12657
5 changed files with 634 additions and 20 deletions
+19 -4
View File
@@ -19,7 +19,6 @@
-include("gd.hrl").
-include("gdl.hrl").
-record(h,
{win = none :: none | wx:wx_object(),
sz = none :: none | wx:wx_object()}).
@@ -204,6 +203,7 @@ init(Prefs) ->
ok = gd_v:safe_size(Frame, Prefs),
ok = wxFrame:connect(Frame, command_button_clicked),
ok = wxFrame:connect(Frame, char_hook),
ok = wxFrame:connect(Frame, close_window),
true = wxFrame:show(Frame),
ok = wxListBox:connect(Picker, command_listbox_selected),
@@ -291,7 +291,7 @@ handle_event(#wx{event = #wxCommand{type = command_button_clicked},
case lists:keyfind(ID, #w.id, Buttons) of
#w{name = wallet} -> wallman(State);
#w{name = chain} -> netman(State);
#w{name = dev} -> devman(State);
#w{name = dev} -> doomweaver(State);
#w{name = node} -> set_node(State);
#w{name = make_key} -> make_key(State);
#w{name = recover} -> recover_key(State);
@@ -312,6 +312,16 @@ handle_event(#wx{event = #wxCommand{type = command_listbox_selected,
State) ->
NewState = do_selection(Selected, State),
{noreply, NewState};
handle_event(#wx{event = #wxKey{keyCode = Code}}, State) ->
NewState =
case Code of
69 -> express(State);
70 -> doomweaver(State);
_ ->
ok = io:format("Code: ~p", [Code]),
State
end,
{noreply, NewState};
handle_event(#wx{event = #wxClose{}}, State = #s{frame = Frame, prefs = Prefs}) ->
Geometry =
case wxTopLevelWindow:isMaximized(Frame) of
@@ -367,8 +377,13 @@ netman(State) ->
State.
devman(State) ->
ok = gd_con:show_ui(gd_v_devman),
doomweaver(State) ->
ok = gd_con:show_ui(gd_v_doomweaver),
State.
express(State) ->
ok = io:format("GajuExpress~n"),
State.