Exemplo n.º 1
0
void slot_button::respond_to_events(const game_gui_context context, const this_in_container this_id, const gui_entropy& entropies) {
	game_gui_rect_node::respond_to_events(context, this_id, entropies);
	
	for (const auto& info : entropies.get_events_for(this_id)) {
		this_id->detector.update_appearance(info);

		if (info == gui_event::lfinisheddrag) {
			this_id->user_drag_offset += griddify(info.total_dragged_amount);
		}
	}
}
Exemplo n.º 2
0
void slot_button::advance_elements(const logic_gui_context& context, const this_in_container& this_id, const gui_entropy& entropies, const augs::delta dt) {
	game_gui_rect_node::advance_elements(context, this_id, entropies, dt);
	
	for (const auto& info : entropies.get_events_for(this_id)) {
		this_id->detector.update_appearance(info);

		if (info == gui_event::lfinisheddrag) {
			this_id->user_drag_offset += griddify(info.total_dragged_amount);
		}
	}
}
Exemplo n.º 3
0
void drag_and_drop_target_drop_item::advance_elements(const logic_gui_context& context, const this_pointer& this_id, const gui_entropy& entropies, const augs::delta) {
	for (const auto& e : entropies.get_events_for(this_id)) {
		this_id->detector.update_appearance(e);
	}
}